The Thing That Should Not Be
Feb. 11th, 2005 07:01 pmHaving now been using Java for 2 weeks I feel categorically able to make two definitive statements about terrible, terrible design decisions.
1) Case Sensitivity is a really stupid idea. When you're trying to debug your code the last thing you want to be doing is trying to spot which bit of a name you've miscapitalised. There's just no need for it any more - it's obviously a hangover from the days when the extra step of converting everything to the same case during compilation would have been an overload. Nowdays having to remember that MyPatternMatcher and myPatternMatcher aren't the same is just silly. Oh, and the fucking capitalisation of the built-in libraries, where everything starts with a lower-case character, but then has upper case characters for all following words (i.e. myList.getNextListEntry) is just plain fucked up - either words should start with a capital letter, or they bloody well shouldn't.
2) Zero Based Counting are just positively counterintuitive. I mean, yes, if you start counting at 1 then you might waste a teeny amount of storage, but it prevents the silliness that happens when you retrieve an array size and then access the contents of the entries up to _one less than that number_. Imagine trying to do this anywhere in life except in a computer program? Wait - we do! The British insist that there is a ground floor and _then_ a first floor, and look how stupidly confusing that is to everyone else. Again - back in the olden days this might have been acceptable, but it makes things actively less readable and is therefore BAD.
Thankfully it does have iterators, so I can live with that. And the latest version even has a ForEach statement, which is positively modern and useful.
1) Case Sensitivity is a really stupid idea. When you're trying to debug your code the last thing you want to be doing is trying to spot which bit of a name you've miscapitalised. There's just no need for it any more - it's obviously a hangover from the days when the extra step of converting everything to the same case during compilation would have been an overload. Nowdays having to remember that MyPatternMatcher and myPatternMatcher aren't the same is just silly. Oh, and the fucking capitalisation of the built-in libraries, where everything starts with a lower-case character, but then has upper case characters for all following words (i.e. myList.getNextListEntry) is just plain fucked up - either words should start with a capital letter, or they bloody well shouldn't.
2) Zero Based Counting are just positively counterintuitive. I mean, yes, if you start counting at 1 then you might waste a teeny amount of storage, but it prevents the silliness that happens when you retrieve an array size and then access the contents of the entries up to _one less than that number_. Imagine trying to do this anywhere in life except in a computer program? Wait - we do! The British insist that there is a ground floor and _then_ a first floor, and look how stupidly confusing that is to everyone else. Again - back in the olden days this might have been acceptable, but it makes things actively less readable and is therefore BAD.
Thankfully it does have iterators, so I can live with that. And the latest version even has a ForEach statement, which is positively modern and useful.
no subject
Date: 2005-02-11 07:45 pm (UTC)REBOL doesn't use zero based counting.
REBOL does have iterators.
REBOL does have a foreach word.
What's your thoughts on operator precedence? REBOL just evaluates left to right and I've found once you get used to it, it makes little difference. We can use parens when necessary, but don't seem to need them as much as you'd think.
no subject
Date: 2005-02-12 09:33 am (UTC)Oh, and I read the anti-Java rant and disagreed with about half of it - I _like_ static typing, for instance.
no subject
Date: 2005-02-12 11:37 am (UTC)Which means you probably won't find any jobs requiring REBOL abilities, so a language to learn for its own sake at the moment - unless you're a freelancer whose code isn't going to be passed on to others in the future.
no subject
Date: 2005-02-12 02:17 am (UTC)Oh, and it's something you'll get used to in a bit. I mean, it's not as if you get run-time errors from mis-capitalisation, surely?
As for zero-based counting, I might agree with you if you hadn't used UK floors as an example. I'm not at all confused by UK floor numbering. In the UK, when we say "2nd floor", we mean "2 floors up from the ground floor". This might be initially confusing to a Merkin visitor, but on the other hand it also means that we can talk about floor -3, which is the sub-sub-basement (three floors below the ground floor), and if you go from floor -3 to the second floor, it will take five floors and that's obvious.
This is no use for arrays, of course, where there is no such thing as a negative array apart from, maybe, index -1 meaning the last element of the array - negative indexes wrap around as opposed to go into negative space - but I'm not here to make your arguments better for you ;-).
no subject
Date: 2005-02-12 05:00 am (UTC)http://www.ceejbot.com/blog/space/start/2005-02-11/5#Stamp_out_Java_now
no subject
Date: 2005-02-12 09:35 am (UTC)The idea of a language not being case sensitive is... weird. That'd be like, you know, Basic! Takes me back to my early teens, where I labouriously typed in the code for adventure games (long before I knew it was called "code") from a wonderful collection of kids' books, into my not-so-trust Tandy Color Computer (or "CoCo"), to be saved on audio cassette. Dear God™, I can hear it even now...
no subject
Date: 2005-02-12 09:45 am (UTC)And removing case sensitivity just removes something you otherwise have to think about - I should have to care about case sensitivity. Of course, if the IDE I was using had autocomplete I wouldn't be worrying about it that much either.
no subject
Date: 2005-02-14 08:53 am (UTC)For i = LBound(ArrayVar) to UBound(ArrayVar)
No bounds problems AT ALL. For collections always used 'for each'. Of course with various external libraries' homerolled collections it was often a guess as to whether it was 1 to .Count or 0 to .Count -1, and often people just didn't know how to implement 'for each' in VB (it was a trifle obscure to say the least!)
In C#, I use foreach (actually I may have got a teeny bit sloppy on that one, must check!)
no subject
Date: 2005-02-14 12:03 am (UTC)As for case-sensitivity, I have no problem with it. I get annoyed when reading VB code where the same variables are capitalized differently on different lines... How can they be read as the same variable if they even look different!
Using lowerUpperCaseSyntax makes sense to me, because variables usually start in lower case, but capitalizing the other words makes them easier to read. Whereas names that start with uppercase are usually the names of classes, and all-uppercase is used for constants. Or sometimes, starting with a lower-case letter is used for private variables & functions, while starting with an uppercase letter is used for public ones... I suppose you're right, it can get confusing.
no subject
Date: 2005-02-14 12:11 am (UTC)But if did have to debug to find this kind of problem... I wonder what kind of interesting code you had, that the compiler didn't catch the error? Or... maybe you use "debugging" to also mean fixing compile-time errors, and not just runtime ones.
no subject
Date: 2005-02-14 09:01 am (UTC)thus:
private string firstName;
public string FirstName
{
get {return firstName;}
set {firstName= value;}
}
Otherwise you have to use some form of hungarian (mFirstName, _FirstName) or a totally different name (naff beyond naff). I'm slowly coming round ot this one.
MY pet hate (and Sean's too - and he has had WAY longer and WAY more exposure to hate) is
private void Horrible{
//stuff
}
instead of
private void Nice
{
no subject
Date: 2005-02-15 11:37 am (UTC)