|
-
Feb 14th, 2002, 04:06 PM
#1
Originally posted by parksie
I never said you couldn't, I said you weren't allowed to.
It's a reserved prefix.
Not allowed? By whom? Is there some list of disallowed names somewhere? This is new to me.
-
Feb 14th, 2002, 05:58 PM
#2
transcendental analytic
the C++ keywords can't be used as indentifiers, the compiler won't accept it, (neither will keywords used by the compiler) but I don't know any compiler that doesn't disallow "reserved" keywords like stroustrup 
you can't make up a list of the "reserved" keywords according to parksie, you obviously have infinite amount of them. The C++ keywords are listed though, search for them
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Feb 16th, 2002, 08:31 AM
#3
Monday Morning Lunatic
They're reserved for the standard. If you have a function str-anything then you're messing with ANSI/ISO, and they have the final say on who owns the name...
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Feb 16th, 2002, 08:36 AM
#4
hmm..
Is there someplace where I can see these standards?
-
Feb 16th, 2002, 08:41 AM
#5
Monday Morning Lunatic
You buy them from ANSI / ISO.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Feb 16th, 2002, 08:44 AM
#6
I'm getting the impression that these standards are only for big businesses that are willing to pay to look at them.
Does everyone actually use them?
-
Feb 16th, 2002, 08:46 AM
#7
Monday Morning Lunatic
You can get out-of-date electronic copies, and also on things like the yahoo groups c-prog mailing list people will quote you bits if you ask them.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Feb 16th, 2002, 08:51 AM
#8
So everyone does use them, then? (relatively speaking)
-
Feb 16th, 2002, 10:06 AM
#9
CB - regular expressions are clearly defined, not limited to perl, but apply in grep, sed, awk, etc. I'm sure you didn't mean to imply that, but that is how I read it.
Parksie - The str thing. This also happens in other OS's, Parksie. We reserved the ENV prefix for VMS. The DEC people had already set aside about 12 like Str, Mth, Sys$, and so on.
The idea is: if I use my special prefix as part of my standard nomenclature, I'm guaranteed that my code will be comptatible, and link, with eveybody else's stuff. No name conflicts.
For example, don't create a dll that starts with MS. You probably will regret it someday.
Tygur - what he's talking about is standard naming. You have a company - TYGURSOFT. All your proprietary names start with Tyg.
You can resister the prefix as a standard name. The str thing goes one step beyond, it's part of a defined ANSI standard. Will something break if you use strfoo() as a function name? No.
-
Feb 16th, 2002, 10:11 AM
#10
Monday Morning Lunatic
There's two styles I know of, POSIX and Perl styles (the only ones I'm vaguely familiar with).
As far as the str thing goes, that was just an example, I think they've taken a lot more than that...but your point still stands...
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Feb 17th, 2002, 09:40 AM
#11
I think they also have taken wcs, which is the UNICODE equivalent of str.
jim: just what parksie said. I know that other things beside perl use regexps, but from my knowledge of PHP I know that it supports both perl and POSIX style regexps, but since I only know the perl one, I wanted to point out that I use this variation.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|