• (cs)

    At the risk of going off topic, I'm pretty indifferent about case-sensitivity in programming languages. But I really don't like it for file systems, and try to work around what I see as that dumb decision by turning on case-insensitive globbing and tab completion. That takes care of most issues.

  • (cs) in reply to hoodaticus
    hoodaticus:
    frits:
    TRWTF are globals. And procedural programming. And functional programming. And aspect oriented programming. And whatever other techniques I don't use.

    TRWTF is where ignorance and arrogance converge.

    Thanks for the synopsis sans sarcasm.

  • History Teacher (unregistered) in reply to Zylon
    Zylon:
    What IS the argument for case-sensitive names, anyway?
    In some languages it's quite common to have the class name starting with upper case, and then be able to name other related things with same name starting in lower case (usually used with camel case).

    Then of course there's Java's Int vs int types, which sounds much more sensible than iNt and inTeGeR types if it were case insensitive.

    Then it's much nicer to "grep" for things in code when case has a meaning. Example: if all classes start with upper case letter, it's easy to grep for classes starting with something without getting a billion variables and functions starting with same string.

    Yet more reason is name space pollution. When cases are different, name spaces are bigger (twice as big per letter used in a name).

    And finally, there's the fact that 99% of sloppy coders produce not only sloppy but crappy code, and only sloppy coders would like to use variable case for same identifiers. Crappy coders aren't worth listening to, and sloppy but non-crappy coders are such a minority that they can be safely ignored (proven by the fact that popular languages mostly are case-sensitive).

  • Larry (unregistered)

    TRWTF is variables.

  • boog (unregistered) in reply to EvanED
    EvanED:
    At the risk of going off topic, I'm pretty indifferent about case-sensitivity in programming languages. But I really don't like it for file systems, and try to work around what I see as that dumb decision by turning on case-insensitive globbing and tab completion. That takes care of most issues.
    So I take it that this is not a problem on embedded systems?
  • Indeed (unregistered) in reply to Anon
    Anon:
    JamesQMurphy:
    A Moron:
    kaalikas:
    Lars:
    Case sensitive is good. It's kind of annoying when Initialize and initialize is the same name for everyone except people in Turkey.
    this.
    Help a moron out by explaining this please.
    http://en.wikipedia.org/wiki/Dotted_and_dotless_I

    Ahh....so we can all agree that TRWTF are the Turks.

    Turkey r and idiot and shuld be band from the internets.

  • Ralph (unregistered) in reply to EvanED
    EvanED:
    At the risk of going off topic, I'm pretty indifferent about case-sensitivity in programming languages. But I really don't like it for file systems, and try to work around what I see as that dumb decision by turning on case-insensitive globbing and tab completion. That takes care of most issues.
    Hafta disagree here. For reasons I don't understand, a large codebase had a Makefile and a MAKEFILE in the same directory. When the project was copied to a case-insensitive Mac, the two files tried to occupy the same space and the project would no longer build. TRWTF is assuming you can just go change file system semantics willy-nilly and not break stuff you never even heard of.

    Also, some filenames have a nasty habit of finding their way into URLs, which -- like it or not -- ARE case sensitive, so even though index.html and Index.html might resolve to the same file on your system, the entire web is going to think you have two different pages on your site, and behave accordingly. This breaks a lot of stuff.

  • Jeff (unregistered) in reply to History Teacher
    History Teacher:
    99% of sloppy coders produce not only sloppy but crappy code, and only sloppy coders would like to use variable case for same identifiers.
    Right. We need to identify sloppy coders as quickly as possible, so they can be redirected into careers that don't involve torturing innocent bits.
  • (cs) in reply to Ralph
    Ralph:
    EvanED:
    At the risk of going off topic, I'm pretty indifferent about case-sensitivity in programming languages. But I really don't like it for file systems, and try to work around what I see as that dumb decision by turning on case-insensitive globbing and tab completion. That takes care of most issues.
    Hafta disagree here. For reasons I don't understand, a large codebase had a Makefile and a MAKEFILE in the same directory. When the project was copied to a case-insensitive Mac, the two files tried to occupy the same space and the project would no longer build. TRWTF is assuming you can just go change file system semantics willy-nilly and not break stuff you never even heard of.

    If people hadn't made the stupid decision back in the 60s to have a case-sensitive file system in the first place, there wouldn't have been a separate Makefile and MAKEFILE in the first place. ;-)

    IMO the fault there lies entirely with the project and not the file system; it's not like case-insensitive file systems only recently became common or something.

    (The only argument against it I find convincing are based off of internationalization arguments that don't apply if you just have ASCII. So I stand by my statement that the decision was originally stupid even if it's less stupid now.)

    Also, some filenames have a nasty habit of finding their way into URLs, which -- like it or not -- ARE case sensitive, so even though index.html and Index.html might resolve to the same file on your system, the entire web is going to think you have two different pages on your site, and behave accordingly. This breaks a lot of stuff.

    Like what? Considering that a not-insignificant percentage of the web runs on IIS, I'm surprised that it's not burning in flames.

    Besides, having a case-insensitive file system doesn't mean that the server couldn't do an extra check to make sure the case actually matches. (Or perhaps IIS does such a check.)

  • (cs) in reply to Max
    Max:
    Andy:
    Bill's Kid:
    [There | there | THERE] [is | Is |IS] [SomeThing | Something | someThing | SOMETHING] [To | to | TO ] [Be | be | BE] [Said | said | SAID] [For | for] [Case | case | CASE] [Insensitivity | insensitivity | INSENSITIVITY]

    I think we should introduce word length / abbreviation insensitivity too, just in case people want to use $emailaddr...

    This 'feature' exists in Fortran 77. Variable names (case insensitive) are capped at 6 characters long. Any extra characters are just ignored by the compiler (as is whitespace). The result is that "Emailaddress", "email ADDRESS", and "EmAiLa" are all the same variable. Further, if you have a variable "TEMPERED" and a variable "TEMPERATURE", they will actually be the same variable "TEMPER". This is entirely fun and not at all frustrating to deal with.
    I recall that the VAX FORTRAN 77 compiler I used in the early 1990's would treat up to 31 characters as significant. And yes, the 6-character significance limit is fun - at least, if you enjoy pounding your head against a concrete wall!

  • (cs) in reply to wtf
    wtf:
    Mason Wheeler:

    Case sensitivity was allowed on C, like so many of its other misfeatures, simply because it's easier to implement. Case sensitivity makes for simpler string comparisons and you don't have to store both original and allcaps versions of all the identifiers in your symbol table for proper error/warning reporting. And it remains in other languages mostly because of cargo-cult language design. (That's the way it is in C, so it must be good, right?)

    The trouble with this post is I can't tell whether the guy is serious, in which case it's hilarious, or whether he's trying to make a joke, in which case it's not.

    I'm absolutely serious, TYVM. Case sensitivity is a huge mess that allows for all sorts of ugly abuses. Whenever I see someone writing something in C like "HWND hwnd;" I wanna throttle them. With the exception of a few proper nouns that are also normal concepts, a word means the same thing no matter how we capitalize it, so why shouldn't an identifier written as a word?

  • Anon (unregistered) in reply to Mason Wheeler
    Mason Wheeler:
    wtf:
    Mason Wheeler:

    Case sensitivity was allowed on C, like so many of its other misfeatures, simply because it's easier to implement. Case sensitivity makes for simpler string comparisons and you don't have to store both original and allcaps versions of all the identifiers in your symbol table for proper error/warning reporting. And it remains in other languages mostly because of cargo-cult language design. (That's the way it is in C, so it must be good, right?)

    The trouble with this post is I can't tell whether the guy is serious, in which case it's hilarious, or whether he's trying to make a joke, in which case it's not.

    I'm absolutely serious, TYVM. Case sensitivity is a huge mess that allows for all sorts of ugly abuses. Whenever I see someone writing something in C like "HWND hwnd;" I wanna throttle them. With the exception of a few proper nouns that are also normal concepts, a word means the same thing no matter how we capitalize it, so why shouldn't an identifier written as a word?

    My brain came with a context sensitive parser built in. Didn't yours?

  • Brian White (unregistered) in reply to wtf
    wtf:
    HerroRygar:
    Zylon:
    What IS the argument for case-sensitive names, anyway?

    I tend to use them when I feel that I've made a class that is descriptive enough that there is very little value I can add by messing with the variable name too much. For example, in a recent project, I made a class called AssemblyTokenizer. I'm fairly certain that I declared it with...

    AssemblyTokenizer assemblyTokenizer = new AssemblyTokenizer();

    ...because I felt that naming the object "sourceTokenizer" or "tokenizer" or something was just a slightly silly and unnecessary abstraction.

    I dunno. I'm not a case-sensitive diehard, but it is a nice feature.

    This is perfectly standard, and perfectly readable. One is a class, the other is an object. No Java programmer would have a problem reading this.

    .Net programmers are fond of this too. I am not though. Why name your variable the same as the class? Do you declare Int int? What happens if you need a second int? int and int2? With no description of what the variable is doing? To me, naming the variable in a way that describes its usage in context is the most important way to self-document your code.

  • ctw (unregistered) in reply to wtf
    wtf:
    Mason Wheeler:

    Case sensitivity was allowed on C, like so many of its other misfeatures, simply because it's easier to implement...

    The trouble with this post is I can't tell whether the guy is serious, in which case it's hilarious, or whether he's trying to make a joke, in which case it's not.

    No, this is true. C is really easy to write a (non-optimizing) compiler for. This was, back in the day, considered a major feature of C, and according to some people is the reason for C's runaway success: http://www.jwz.org/doc/worse-is-better.html

  • wtf (unregistered) in reply to Mason Wheeler

    [quote user="Mason Wheeler"][quote user="wtf"]

    I'm absolutely serious, TYVM. Case sensitivity is a huge mess that allows for all sorts of ugly abuses. Whenever I see someone writing something in C like "HWND hwnd;" I wanna throttle them. With the exception of a few proper nouns that are also normal concepts, a word means the same thing no matter how we capitalize it, so why shouldn't an identifier written as a word?[/quote]

    YVW.

    Hm. I can sort of see where you're coming from. But your example is just bad naming conventions, and bad coders will come up with this sort of crap no matter what you do. I'd want to throttle that guy, too, but I'd probabaly end up throttling him for something else anyway. Case-sensitive languages make sense to me, but the rigor that they enforce (a given variable has a single representation) allows a laxity that you object to (the "same" string can mean multiple variables).

    Okay, so you're serious and it's not hilarious. My bad. Now we just need more stringent enforcement of naming conventions, and it won't be an issue either way. Would bastinado be sufficient, do you think?

  • Anon (unregistered) in reply to Brian White
    Brian White:
    wtf:
    HerroRygar:
    Zylon:
    What IS the argument for case-sensitive names, anyway?

    I tend to use them when I feel that I've made a class that is descriptive enough that there is very little value I can add by messing with the variable name too much. For example, in a recent project, I made a class called AssemblyTokenizer. I'm fairly certain that I declared it with...

    AssemblyTokenizer assemblyTokenizer = new AssemblyTokenizer();

    ...because I felt that naming the object "sourceTokenizer" or "tokenizer" or something was just a slightly silly and unnecessary abstraction.

    I dunno. I'm not a case-sensitive diehard, but it is a nice feature.

    This is perfectly standard, and perfectly readable. One is a class, the other is an object. No Java programmer would have a problem reading this.

    .Net programmers are fond of this too. I am not though. Why name your variable the same as the class? Do you declare Int int? What happens if you need a second int? int and int2? With no description of what the variable is doing? To me, naming the variable in a way that describes its usage in context is the most important way to self-document your code.

    So you clearly missed the part where the OP said "if the class [name] is descriptive enough". "int" clearly doesn't qualify. If a class is called AssemblyTokenizer (to use OP's example) because that's what it is, giving it another name such as just "tokenizer" ends up being less descriptive rather than more. If you need an AssemblyTokenizer variable in your code, what would you suggest you call that variable? myAssemblyTokenizer perhaps? 'cos that really helps.

  • wtf (unregistered) in reply to Brian White
    Brian White:
    .Net programmers are fond of this too. I am not though. Why name your variable the same as the class? Do you declare Int int? What happens if you need a second int? int and int2? With no description of what the variable is doing? To me, naming the variable in a way that describes its usage in context is the most important way to self-document your code.

    There are plenty of cases where you need a single instance of some self-documenting item. If you're reading a file, you're going to have one BufferedReader, and I'd rather it were called "bufferedReader" than something clever like "br". Or maybe you're setting up something in an MVC pattern, you might have a class called "Model", and instatiate it as "model". Or perhaps you're iterating through a graph composed of Nodes - "for (Node node: graph){...}"

    If there's more than one instance of a class in play, then of course you need to use more descriptive names, but often this is not the case, and the more descriptive names just get in the way.

    One-off ints are i, j, k, by convention. If they're persistent, they get descriptive names.

  • mjb (unregistered)

    I occasionally make use of case-sensitivity.

    I'm using cake, and on occasion I need to use an unrelated model, I'll Capitalize that variable: $Person

    then I want to grab a person from the database, that variable will use the cakephp naming conversion $person

    so I'd have $person = $Person->find( ... );

    If you have a good code style guide then it an be used effectivly, but as with all things php, if you don't know what you're doing, you end up with messy code.

    BTW I have a hammer downstairs, I could use it to smash all the windows in my house, does that make it a crap tool, or would doing that make me a crap tool?

  • FuBar (unregistered) in reply to corwin766
    corwin766:
    Case-insensitivity is too much work for a PDP-11.
    Not if it's running VMS. Yay VMS!
  • Anon (unregistered) in reply to wtf

    [quote user="wtf"][quote user="Mason Wheeler"][quote user="wtf"]

    I'm absolutely serious, TYVM. Case sensitivity is a huge mess that allows for all sorts of ugly abuses. Whenever I see someone writing something in C like "HWND hwnd;" I wanna throttle them. With the exception of a few proper nouns that are also normal concepts, a word means the same thing no matter how we capitalize it, so why shouldn't an identifier written as a word?[/quote]

    YVW.

    Hm. I can sort of see where you're coming from. But your example is just bad naming conventions, and bad coders will come up with this sort of crap no matter what you do. I'd want to throttle that guy, too, but I'd probabaly end up throttling him for something else anyway. Case-sensitive languages make sense to me, but the rigor that they enforce (a given variable has a single representation) allows a laxity that you object to (the "same" string can mean multiple variables).

    Okay, so you're serious and it's not hilarious. My bad. Now we just need more stringent enforcement of naming conventions, and it won't be an issue either way. Would bastinado be sufficient, do you think?[/quote]

    So will good coders. You may not like his naming conventions, but I doubt anyone would argue that Raymond Chen is a bad coder.

    Count the HWND hwnd instances here: http://blogs.msdn.com/b/oldnewthing/archive/2003/07/23/54576.aspx

    I never had any issue reading (or writing) code like that. I fail to understand your complaints, really.

  • Christopher Martin (unregistered) in reply to HerroRygar
    HerroRygar:
    Zylon:
    What IS the argument for case-sensitive names, anyway?

    I tend to use them when I feel that I've made a class that is descriptive enough that there is very little value I can add by messing with the variable name too much. For example, in a recent project, I made a class called AssemblyTokenizer. I'm fairly certain that I declared it with...

    AssemblyTokenizer assemblyTokenizer = new AssemblyTokenizer();

    ...because I felt that naming the object "sourceTokenizer" or "tokenizer" or something was just a slightly silly and unnecessary abstraction.

    I dunno. I'm not a case-sensitive diehard, but it is a nice feature.

    You don't need case-sensitivity to do this in Java. Classes, methods, and variables can be distinguished synactically, so they don't need to share a namespace. This is perfectly valid (although terrible):

    class A {
        A A() { return new A(); }
        { A A = A(); }
    }
    
  • (cs)

    Somewhat off topic trivia question...

    The traditional Unix file systems allow 254 of the 256 ASCII values to be used as characters in a file name. Name the other two.

  • Googoo (unregistered) in reply to Zylon
    Zylon:
    What IS the argument for case-sensitive names, anyway?

    Case is locale dependent. The end result is code may not be 100% portable internationally.

    e.g. This code may execute differently in different countries.

    var ASSERTION = TRUE

    do if assertion equals true -- live another day sleep 24 * 60 * 60 else -- bye bye launch_doomsday_weapon end if while true

  • Gunslinger (unregistered)

    TRWTF is the unnecessary nesting. And VB.

  • (cs) in reply to Rick
    Rick:
    Somewhat off topic trivia question...

    The traditional Unix file systems allow 254 of the 256 ASCII values to be used as characters in a file name. Name the other two.

    Trick question. There are only 128 ASCII values. However, I think you're looking for foward slash '/' and NULL '\0'.

  • Not Dennis Ritchie (unregistered) in reply to Rick
    Rick:
    Somewhat off topic trivia question...

    The traditional Unix file systems allow 254 of the 256 ASCII values to be used as characters in a file name. Name the other two.

    Off the top of my head, 007 and 012? Hearing your tty beep in the middle of an ls would be awfully confusing. And newlines would mess up the output.

  • (cs) in reply to frits
    frits:
    Rick:
    Somewhat off topic trivia question...

    The traditional Unix file systems allow 254 of the 256 ASCII values to be used as characters in a file name. Name the other two.

    Trick question. There are only 128 ASCII values. However, I think you're looking for foward slash '/' and NULL '\0'.

    Those two I'm pretty sure aren't allowed. You can have really much fun though with filenames containing '\r' or '\b'.
  • Anon (unregistered) in reply to Gunslinger
    Gunslinger:
    Gunslinger:
    Gunslinger:
    Gunslinger:
    Gunslinger:
    Gunslinger:
    Gunslinger:
    Gunslinger:
    TRWTF is the unnecessary nesting.
    And VB.

    FTFY

  • (cs) in reply to Not Dennis Ritchie
    Not Dennis Ritchie:
    Rick:
    Somewhat off topic trivia question...

    The traditional Unix file systems allow 254 of the 256 ASCII values to be used as characters in a file name. Name the other two.

    Off the top of my head, 007 and 012? Hearing your tty beep in the middle of an ls would be awfully confusing. And newlines would mess up the output.

    But perfectly valid none the less.

    My all time favorite file name is .{BackSpace}

  • AC (unregistered) in reply to MZ
    MZ:
    The fact that you aborted a perfect opportunity to use the word "quaternary" makes me sad...

    And quinternary, and, most shameful of all, you overlooked "sexternary".

    Tsk tsk tsk.

    AC

  • (cs) in reply to Ilya Ehrenburg
    Ilya Ehrenburg:
    frits:
    Rick:
    Somewhat off topic trivia question...

    The traditional Unix file systems allow 254 of the 256 ASCII values to be used as characters in a file name. Name the other two.

    Trick question. There are only 128 ASCII values. However, I think you're looking for forward slash '/' and NULL '\0'.

    Those two I'm pretty sure aren't allowed. You can have really much fun though with filenames containing '\r' or '\b'.

    Oh man, that's just evil!! :-)

    (I've had my share of 'fun' with files containing \r's in odd places.....)

    Yours Yazeran

    Plan: To go to Mars one day with a hammer

  • K (unregistered) in reply to Phlip
    Phlip:
    I was about to post a comment about how PHP is case-insensitive anyway, but having tried it, it seems that variable names in PHP are case-sensitive. Functions in PHP are case-insensitive; hell, even keywords like "if" are case-insensitive. But variables are case-sensitive.

    What the hell, PHP?

    If that statement is true, then it deserves to by highlighted.

  • Ralph (unregistered) in reply to EvanED
    EvanED:
    If people hadn't made the stupid decision back in the 60s to have a case-sensitive file system in the first place, there wouldn't have been a separate Makefile and MAKEFILE in the first place. ;-)
    But they did. So now, when you change things, you break stuff.
    Also, some filenames have a nasty habit of finding their way into URLs, which -- like it or not -- ARE case sensitive, so even though index.html and Index.html might resolve to the same file on your system, the entire web is going to think you have two different pages on your site, and behave accordingly. This breaks a lot of stuff.
    Like what? Considering that a not-insignificant percentage of the web runs on IIS, I'm surprised that it's not burning in flames.

    Besides, having a case-insensitive file system doesn't mean that the server couldn't do an extra check to make sure the case actually matches. (Or perhaps IIS does such a check.)

    • A search engine is going to think example.com/Index.asp is a different page from example.com/index.asp (and INDEX.asp and so on...) cluttering up search results.

    • Your browser is also going to think they are different, so things like the highlighted underline that shows whether you've visited this page before or not will be wrong.

    • Caching proxy servers retain multiple copies of the same thing in cache, consuming resources and reducing performance.

    • Same for your browser's cache.

    • I saw a CIO of a large organization fired because the auditor found a significant increase in security vulnerabilities compared to the previous web scan. What if the "increase" was illusory, because the same URLs were counted multiple ways? Clever way to get your CIO fired, I suppose...

    Yes, clients can (and some do, each their own unique way) check the content to see if the two URLs are really the same. But dynamic URLs change from one load to the next, causing a lot of extra work and incorrect decisions because some lazy programmer can't remember when to use upper vs. lower case.

    Those are just the first few examples I can think of. But you arrogantly assumed there weren't any, because you weren't aware of any.

    So regarding "IIS not burning in flames", your inability to recognize a fire doesn't mean you're safe to sleep in a burning house.

    And your assumption that it could all be handled at the server end means you don't have the necessary clue to be working web development.

  • Andrew (unregistered) in reply to TGV
    I think a regexp search on the map that contains the global variables would be a superior solution.

    I'm not sure of the PHP syntax for that, but in Perl this would lead you down this beautiful path:

    $email = ${$::{(grep(/email_?addr(ess)?/i,keys %::))[0]}};

    Ahhhhh.

  • drusi (unregistered) in reply to Jordan Bray
    Jordan Bray:
    Unfortunately TerminalSalt and TerminalsAlt /are/ different variables.
    I had just the right amount of TerminalSalt on my TerminalFries at lunch today.
  • (cs) in reply to Andrew
    Andrew:
    I think a regexp search on the map that contains the global variables would be a superior solution.

    I'm not sure of the PHP syntax for that, but in Perl this would lead you down this beautiful path:

    $email = ${$::{(grep(/email_?addr(ess)?/i,keys %::))[0]}};

    Ahhhhh.

    Add a few more parenthesis and that could likely parse as valid lisp.... ;-)

    Yazeran

    Plan: To go to Mars one day with a hammer

  • ideo (unregistered) in reply to Anon
    Anon:
    JamesQMurphy:
    A Moron:
    kaalikas:
    Lars:
    Case sensitive is good. It's kind of annoying when Initialize and initialize is the same name for everyone except people in Turkey.
    this.
    Help a moron out by explaining this please.
    http://en.wikipedia.org/wiki/Dotted_and_dotless_I

    Ahh....so we can all agree that TRWTF are the Turks.

    Armenian, are ya? 'Grats on surviving the GC.

  • Sgt. Ermy (unregistered)

    Oh, you're case sensitive...WHY DON'T YOU GROW UP AND ACT LIKE A MAN, YOU JACKWAGON!

  • DSkoll (unregistered)

    You case-insensitive clods!

  • Anon (unregistered) in reply to ideo
    ideo:
    Anon:
    JamesQMurphy:
    A Moron:
    kaalikas:
    Lars:
    Case sensitive is good. It's kind of annoying when Initialize and initialize is the same name for everyone except people in Turkey.
    this.
    Help a moron out by explaining this please.
    http://en.wikipedia.org/wiki/Dotted_and_dotless_I

    Ahh....so we can all agree that TRWTF are the Turks.

    Armenian, are ya? 'Grats on surviving the GC.

    Ohh.....too soon?

  • Joops (unregistered) in reply to Zylon
    Zylon:
    What IS the argument for case-sensitive names, anyway?

    Is this a troll?

    The less a compiler (or parser) has to work out for itself, the less chance you have of introducing a unintended subtleties. When I write code (or a document, for that matter) I mean exactly what I say (auto-correct sux too). If I have used 'x=0;' somewhere, and 'X=17;' somewhere else, I like the compiler to fail - it cannot (and should not) be certain that I was referring to the same x. Insisting on standards may be a pain in the ass, but it does create more readable programs (and I think better programmers).

    Should compilers also try to find spelling errors in keywords and variables?

    The less that has to be assumed, the less chance that the wrong thing is assumed. Compilers are essentially stupid, so they should be used to translate the bare minimum required. They should trust that the programmer knows what they are doing, and follow their commands exactly. That means that 'this' is different to 'This' is different to 'THIS' etc...

    /* must be using form E */
    if(formE)
    {
    } 
    

    vs

    /* do we need to do this for Windows ME */
    if(forME)
    {
    } 
    

    (vs

    /* debug variable */
    if(forMe)
    {
    }
    

    potentially - yes it's bad, but it's possible)? The compiler should never assume these are the same...

    What about: penIsland vs penisLand ? physiotherapist vs physioTheRapist? catsExchange vs catSexChange?

  • gri (unregistered) in reply to Paul
    Paul:
    I use a language which doesn't mind about cases, and an IDE that will normalise the case to the version used in the declaration.

    TRWTF is languages that think i and I are different variables

    I = me i = loop counter

    Two very different variables in my book....

  • gri (unregistered) in reply to gri
    gri:
    Paul:
    I use a language which doesn't mind about cases, and an IDE that will normalise the case to the version used in the declaration.

    TRWTF is languages that think i and I are different variables

    I = me i = loop counter

    Two very different variables in my book....

    I think anyone who thinks case-sensitivity isn't important is a lazy Gen-Y er or a VB programmer {I use the term loosely}

  • Hannah (unregistered) in reply to Christian
    Christian:
    I had to do something like this a couple times, but I encapsulated it into a function to get the ugly into it's own corner and out of the way of the rest of the code. Though since this screams PHP, I would have suggested using an array of names for variables, a foreach over those and the oh so hated variable variable names. It's already a klutz, might at least use a halfway elegant klutz to rescue you yourself from these kind of things.

    I have a suspicion that they're trying to plug into components other people have written, so they might not have had much choice over how to implement, but tried to cover all (known) bases. Bad, perhaps; understandable, maybe.

  • Lily the Pink (unregistered) in reply to Max
    Max:
    Andy:
    Bill's Kid:
    [There | there | THERE] [is | Is |IS] [SomeThing | Something | someThing | SOMETHING] [To | to | TO ] [Be | be | BE] [Said | said | SAID] [For | for] [Case | case | CASE] [Insensitivity | insensitivity | INSENSITIVITY]

    I think we should introduce word length / abbreviation insensitivity too, just in case people want to use $emailaddr...

    This 'feature' exists in Fortran 77. Variable names (case insensitive) are capped at 6 characters long. Any extra characters are just ignored by the compiler (as is whitespace). The result is that "Emailaddress", "email ADDRESS", and "EmAiLa" are all the same variable. Further, if you have a variable "TEMPERED" and a variable "TEMPERATURE", they will actually be the same variable "TEMPER". This is entirely fun and not at all frustrating to deal with.

    Is there a 'like' button somehwere?

  • Ouch! (unregistered)

    I have a question for the case-insensitivists. Should someVar be the same as someVar? If case doesn't matter, typeface shouldn't either or should it?

  • Earp (unregistered)

    This would never have happened in VB...

  • Ralph (unregistered) in reply to Ouch!
    Ouch!:
    I have a question for the case-insensitivists. Should someVar be the same as someVar? If case doesn't matter, typeface shouldn't either or should it?
    That's right, they should be treated the same. And as a previous poster commented, run them thru a spellchecker too. Oh, yeah, and "thru" and "through" are the same. Why should I the almighty human, praised for my flaws, be expected to get it right when the computer can simply guess what I probably meant?

    /Sarcasm

    Seriously, would all you ignorance- and sloppiness-worshipers please off yourselves, and take your crappy software with you? Please?

  • Belongda Mick (unregistered) in reply to EvanED
    EvanED:
    At the risk of going off topic, I'm pretty indifferent about case-sensitivity in programming languages. But I really don't like it for file systems, and try to work around what I see as that dumb decision by turning on case-insensitive globbing and tab completion. That takes care of most issues.

    I remember trying some languages/scripts that didn't care (definitley VB, and something else) - the result was very messy-looking, very unreadable code....

    I find the same with HTML too - because nobody cares about case sensitivity in tags, people get very lazy about being consistent. Ultimately, consistency (above 'most all else) is a verra verra good thing....

  • xlfs (unregistered)

    PHP variables ARE CASE SENSITIVE, so the code works LIKE IT SHOULD.

    RTFM. http://www.php.net/manual/en/language.variables.basics.php

Leave a comment on “The Email Tree”

Log In or post as a guest

Replying to comment #:

« Return to Article