7 ms·
You could have called me a "Pascal devotee" back then, but I had eventually come to realize verbosity kills creativity and dumped Pascal for good. This {
by mojuba 12y ago
You could have called me a "Pascal devotee" back then, but I had eventually come to realize verbosity kills creativity and dumped Pascal for good.
This
{
int a[10];
...
}
wins over this
begin
var
A: array[0..9] of Integer;
...
end;
quite simply because the latter takes longer to both read and write. The proof being that none of the more or less serious languages created in the past few decades dared to adopt e.g. begin ... end again.
- merrua 12y agoruby does begin, end. But maybe you were joking? ruby does ommit where it can though.
- mojuba 12y agoEssentially Ruby does only `end` and so does e.g. the Unix shell. I still prefer { } because it stands out in the text better. I should have mentioned verbosity in declarations too, it's not just begin ... end. And I do miss a few of Pascal's neat features, such as using an enum type as an array index type.
- pjc50 12y agoAnd Python dumped even the { }; you can now pile any number of scope closings into a single newline.
- thret 12y agoI've been using mainly Python lately and I still find it weird. I miss my {} and ;.
- arethuza 12y agoStick with it, when I started using Python I thought significant whitespace was daft - now I think it's brilliantly simple.
- krylon 12y agoWhen I first came across Python, I was really annoyed at the syntax, specifically at its use of indentation. Nobody tells me how to indent my code! But then I realized that Python only "forced" me to do things I would have done otherwise. I got used to its syntax rather quickly. The one thing I like about using braces for delimiting blocks is that Emacs and Vi allow you to jump from the beginning of a block to the end (and vice versa) in one keystroke. But otherwise, I have to agree with Bjarne Stroustrup (sorry if I mis-spelled his name): Programmers can learn to love absolutely any syntax.
- copsarebastards 12y ago> The proof being that none of the more or less serious languages created in the past few decades dared to adopt e.g. begin ... end again. facepalm Except Ruby, OCaml, Erlang, Lua, etc. Frankly, if verbosity is a significant limiting factor on your creativity, a) C is not the solution to your problem, and b) you weren't trying to solve any hard problems anyway. Seriously, if you're doing anything really hard, stuff like thread management and algorithmic complexity is a way bigger limiting factor than minor syntactic differences.
- mojuba 12y agoFrankly, if verbosity is not a limiting factor for you, then you weren't trying to solve hard problems in an elegant way.
- lmm 12y agoSyntax limits everything, it only becomes more important as you're doing hard things. Being able to fit 10% more code on screen is a lot like being 10% smarter, which is the kind of thing you need to make the hard problems even possible.
- jacquesm 12y agoBy that reasoning APL should rule, so there may be some kind of optimum.
- kbenson 12y agot may just be that the learning curve for APL is so steep and so long to become truly proficient that most don't get there. I've long held the opinion that much of the criticism of Perl as "line noise" is more to do with people that aren't really proficient in it thinking they are because a subset of the language is very C-like and familiar, and it can be used for quite a while before encountering anything too foreign to someone that knows C. Once that happens though, it leaves those people scratching their heads wondering what they are seeing. Compare and contrast to APL and Lisp, which are obviously different, and Python, which avoids the problem by having a fairly different syntax and a guide for exactly how to do things. I've seen some pretty amazing things in APL, but I can't really understand them. I don't count that against the language, I just haven't spent the time to actually learn APL. As for there being an optimum, I think there is, but I think it has a lot to do with how long and for how complex of things you plan to use the language. Front-loading learning time for a more expressive language may pay dividends later.