Slashdot Mirror


Nim Programming Language Gaining Traction

An anonymous reader writes: Nim is a young, statically typed programming language that has been getting more attention recently. See these articles for an introduction: What is special about Nim?, What makes Nim practical? and How I Start: Nim. The language offers a syntax inspired by Python and Pascal, great performance and C interfacing, and powerful metaprogramming capabilities. The author of "Unix in Rust" just abandoned Rust in favor of Nim and some early-adopter companies are starting to use it as well.

520 comments

  1. The Secret of Nim by stoolpigeon · · Score: 5, Funny

    When that comes out - I'm buying it regardless of whether or not I actually need to learn or use the language.

    --
    It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
    1. Re: The Secret of Nim by Anonymous Coward · · Score: 1

      I'm waiting for the Nim on Rods, NoR, to come out.

    2. Re:The Secret of Nim by Anonymous Coward · · Score: 0

      And after such an overwhelmingly positive shilling -- I mean showcasing - on Slashdot, who could blame you?

      Nim is love, Nim is life!

    3. Re:The Secret of Nim by buchner.johannes · · Score: 4, Insightful

      If I were to create a new language, I would not focus on creating the most beautiful syntax or the best built-in functionality. Instead, I would make damn sure it plays well with other languages and that it is trivial to use software packages already written. For example, R, Python, Java -- no one wants to recode the packages (machine learning algorithms, MPI, web automatisation) in yet another language.

      --
      NB: The message above might reflect my opinion right now, but not necessarily tomorrow or next year.
    4. Re: The Secret of Nim by Anonymous Coward · · Score: 1

      I believe the project was originally called nimrod. Might get confusing.

    5. Re:The Secret of Nim by diamondmagic · · Score: 4, Informative

      The example you gave is just an example of API designers being stupid: You could call that -1 indexed, because there is a zeroth dimension (mathematically, it has the value of 1 (unitless)).

      1-indexing has the problem of needing to subtract 1 from everything before it's useful for scaling, and much else. The 20th century is 1900...1999 inclusive because of 1-indexing. The year -0001 is also known as 2BC because of 1-indexing. And so on.

      Anywhere your index is an offset (which is most indexes), it needs to be 0-indexed.

    6. Re:The Secret of Nim by IamTheRealMike · · Score: 4, Interesting

      If I were to create a new language, I would not focus on creating the most beautiful syntax or the best built-in functionality. Instead, I would make damn sure it plays well with other languages and that it is trivial to use software packages already written.

      Nim looks syntactically a little bit like Kotlin, which compiles to either JVM bytecode or JavaScript. If you compile to the JVM then you can not only use libraries written in Java, but also JavaScript, Python 2.x (via Jython), Ruby, Scala, C (via JNA), there's even a Haskell for the JVM called Frege.

      The really neat trick, though, is that despite looking not much like Java at all, it compiles down to code that is binary compatible with Java and there is a Java-to-Kotlin rewriting tool, meaning you can convert existing Java codebases one file at a time whilst still having a fully compilable project. Thus you can not only leverage existing codebases written in many languages, but also slowly convert legacy codebases too.

      Kotlin has some syntactic features that look similar to nim, like if being an expression not a statement, ranges, type inference, compile time inlining control, operator overloading, generics etc. Kotlin also has a a variety of features that focus on creating DSLs, but doesn't do it using a full blown macro system.

      Nim has some things Kotlin doesn't and vice versa. I can write a more complete comparison (based on reading the docs) if anyone is interested. But the reason I mention it, is Kotlin's focus on interop with existing code.

    7. Re:The Secret of Nim by Anonymous Coward · · Score: 0

      I hate 1 indexed arrays in matlab! The access math is awkwad and non-standard. I hate running a long script to find out I forgot a +1 on a complex array index calculation.

    8. Re:The Secret of Nim by Anonymous Coward · · Score: 1

      BASIC did this. It was atrocious. It leads to more complications for array slicing (and thus the bugs you think you're avoiding are simply moved elsewhere).

    9. Re:The Secret of Nim by dargaud · · Score: 2
      Don't you mean:

      The 20th century is 1901...2000 inclusive because of 1-indexing.

      --
      Non-Linux Penguins ?
    10. Re:The Secret of Nim by Anonymous Coward · · Score: 0

      Lua?

      Lua has one-indexed arrays, and it's one of the most annoying things I've had to deal with in a language.

      Zero-indexed arrays are certainly not antiquated - 90% of indexes are for defining/using offsets, which are significantly nicer to use when zero-indexed versus one-indexed.

    11. Re:The Secret of Nim by Anonymous Coward · · Score: 0

      If I were to create a new language I would get rid of the antiquated tradition of zero-counting (starting arrays at zero).

      That would prevent annoying bug traps, like remembering that e.g. "sum(array, 1)" actually sums the array along the second dimension, not the first (yes, Python/NumPy really does that).

      Zero-counting was fine for pointer arithmetic. Any language that doesn't use it should move back to 1-counting, as Matlab did.

      [/rant]

      What's the matter, sonny? Need some syntactic sugar coating because you can't deal with how the computer really works underneath?

      Dig beneath the surface and you'll find it's *all* pointer arithmetic at the bottom. The overhead of offsetting by one so that the computer can find what you're actually looking for is something you pay for on every single array access.

    12. Re:The Secret of Nim by photonic · · Score: 2

      I completely disagree. I have worked extensively both with Matlab and Numpy, and I much prefer Python's 0-based indexing and half-open intervals over Matlab's 1-based indexing and closed intervals. Edsger Dijkstra, the famous computer scientist, explained why this is a good idea. E.g. splitting the first n items off an array in Matlab is head = x(1:n); tail = x(n+1:end) , while in Python it is head = x[:n]; tail = x[n:] . Even worse is when doing some computation over blocks within an array, in Matlab you do for i=1:n; y(i) = fun(x((i-1)*m+1:i*m)); end , while in Python it is for i in range(n): y[i] = fun(x[i*m:i*m+m]) . In Matlab, you always have to think careful about the extra +-1, which causes many off-by-one errors, while in Python you just write it down intuitively.

      --
      karma police: arrest this man, he talks in maths; he buzzes like a fridge, he's like a detuned radio. [radiohead]
    13. Re:The Secret of Nim by jythie · · Score: 1

      Key word: non-standard. Often in engineering, standard is better than the best solution.

      Though personally I like zero indexing since it makes more sense, I tend to be kinda skeptical of programmers who prefer 1 indexing since it makes me suspect they do not think much about what the computer is actually doing.

    14. Re:The Secret of Nim by jythie · · Score: 1

      I am always amazed at how many 'programmers' do not want to get all that icky math, science, or engineering on them. Understanding what the computer is doing! Oh my *faint*

    15. Re:The Secret of Nim by buchner.johannes · · Score: 1

      Nim looks syntactically a little bit like Kotlin, which compiles to either JVM bytecode or JavaScript. If you compile to the JVM then you can not only use libraries written in Java, but also JavaScript, Python 2.x (via Jython), Ruby, Scala, C (via JNA), there's even a Haskell for the JVM called Frege.

      Interesting.
      Unfortunately, many Python packages use compiled C code (Cython etc.) which only work in CPython, i.e. not in Jython, not even in PyPy. The most important such difficult-to-port package is NumPy.

      --
      NB: The message above might reflect my opinion right now, but not necessarily tomorrow or next year.
    16. Re:The Secret of Nim by blue+trane · · Score: 0

      I want the computer to understand what I'm doing.

    17. Re:The Secret of Nim by Anonymous Coward · · Score: 0

      one counting is the source of just as many bugs, as the root cause is people don't carefully work things out.

    18. Re:The Secret of Nim by IamTheRealMike · · Score: 3, Interesting

      Yes, that has been a persistent problem for speeding up dynamic languages for years. You can make a better runtime but then can't provide the interpreter API used by the C extensions.

      The Oracle Research JVM team has a totally crazy solution for this. They have implemented an extended version of HotSpot that is capable of actually JIT compiling interpreted source code of Ruby C extensions such that the end result is much faster than the Ruby interpreter using GCC compiled versions of those same extensions.

      The whole blog post is worth a read, but to summarise, what they've built is capable of actually inlining C into Ruby and vice-versa at the compilation level. So for example if a C extension function returns an array of three elements using the C extension API and then Ruby code unpacks it, it can actually compile down to returning those values in registers because the code is inlined together and then compiled in the normal way. Additionally, interpreting the C source code means that the JVM garbage collectors can still compact the heap and do other things that traditionally you cannot do with C.

      Graal/Truffle are unfortunately still research projects. This technology doesn't ship in the regular JVM yet and won't do so for some time. But it's an interesting glimpse at the future of high performance dynamic language runtimes.

    19. Re: The Secret of Nim by Anonymous Coward · · Score: 0

      Haha! Nice!

    20. Re:The Secret of Nim by angel'o'sphere · · Score: 0

      1-counting or x-counting has no problems at all.

      Algol, PL-1, Pascal, Ada all cout from one or from the index the programmer gave.

      Pascal:
            mySubMatrix : ARRAY [13..17][9..13] of INTEGER;

      No problem at all, the compiler simply calculates an artificial base address for the array.


      Anywhere your index is an offset (which is most indexes), it needs to be 0-indexed.

      No, it does not. C and languages derived from it are the only ones requiring a zero index.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    21. Re:The Secret of Nim by Anonymous Coward · · Score: 0

      Zero-counting was fine for pointer arithmetic. Any language that doesn't use it should move back to 1-counting, as Matlab did.

      The reason Matlab arrays are 1-indexed is because the first versions of Matlab were written in Fortran, and Fortran has used 1-indexed arrays since was developed in the 1950's. Which made sense (and still does) for a language designed to turn numerical algorithms into computer code.

      As the saying goes, "Those who do not know Fortran are doomed to reinvent it ... badly."

      -JS

    22. Re:The Secret of Nim by Anonymous Coward · · Score: 0

      I want the computer to understand what I'm doing.

      Yeah, and I wish that unicorns existed. Look, you can't have that. You will never have that. Computers don't do "understanding". They are hyper-literalist to the extreme. Your best option is for you to understand what the computer is doing and write your code accordingly. I am shocked--gobsmacked, actually--that this even needs explaining on a site that touts itself as "news for nerds".

    23. Re:The Secret of Nim by Anonymous Coward · · Score: 0

      And after such an overwhelmingly positive shilling -- I mean showcasing - on Slashdot, who could blame you?

      Nim is love, Nim is life!

      Yawn!

      Wake me up when the next flavour of the month comes out.

    24. Re:The Secret of Nim by TechyImmigrant · · Score: 1

      >while in Python it is head = x[:n]; tail = x[n:]

      While I like Python and spent much of today writing code in it, this (array indexing) is what I hate. I look at that and see n != n. Every time I do some even slightly complicated array indexing, I have to print(f) it to make sure I'm grabbing the right bits.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    25. Re:The Secret of Nim by rtb61 · · Score: 1

      If I was going to invest all that time and effort to program a new language, I would focus on the big end of the market. A computer programming language for non-computer programmers and start with linguistic and teaching experts, so as to construct the core elements of the language to be most accessible to the majority. Then and only then would I let computer programmers touch it and actually program the language. Any functions missing would be passed from the computer programmers back to the linguistic and teaching experts to establish a more logical and teachable structure, which the programmers would then code.

      Likely a language of variable verbosity, more explanatory and clear versus more compact, both capable of coexisting with the same algorithms. I honestly do not think computer programmers are the best people to come up with a programming language, to specialised and the language ends up far to focused on the speciality, with some really distorted language and logic, compared to more generalised uses of language, mathematical and physics formulas.

      Shit programmers have still failed to switch from qwerty back to far more logical alphabetic, so how far off will programmers be from demanding we switch from our ABCs to QWEs in language.

      --
      Chaos - everything, everywhere, everywhen
    26. Re:The Secret of Nim by CaptQuark · · Score: 1

      Those are the programmers that work with COBOL instead.

      .

    27. Re:The Secret of Nim by LordWabbit2 · · Score: 1

      Awesome, would mod you up more but you are already on a 5. That was my favourite movie as a kid "is Timmy gonna die?"

      --
      There are three kinds of falsehood: the first is a 'fib,' the second is a downright lie, and the third is statistics.
    28. Re:The Secret of Nim by diamondmagic · · Score: 2

      SEE WHAT I MEAN?

    29. Re:The Secret of Nim by diamondmagic · · Score: 1

      C and languages derived from it is an awful darn big number of languages. Take a look at http://mashable.com/2015/01/18... : 14 out of 15 use 0-indexing.

      What if we started measuring things at 1? Try it, cut off the first inch/cm of your ruler/measuring tape. Now measure something in cm and convert it to meters.

      We don't start counting ages at 1, one month after birth you're... one month old. Not one year, one month. Zero years, one month.

      If you've ever had to paginate a result set, you know the pain of 1-indexing.

      If you're flipping through a book and you want to take an excerpt, you don't say "It's one paragraph, one page into the chapter on page 55", you say "Zero pages, one paragraph into the chapter starting page 55." 1-indexing would call page 55 the "first page". Indexes aren't ordinal, they're cardinal, so stop treating them like that with 1-indexing.

    30. Re:The Secret of Nim by Anonymous Coward · · Score: 0

      > Additionally, interpreting the C source code means that the JVM garbage collectors can still compact the heap and do other things that traditionally you cannot do with C

      How much memory overhead did you say each of your Java objects had?

      Ah, thought so, my C values has almost zero memory overhead.

    31. Re:The Secret of Nim by angel'o'sphere · · Score: 1

      It is a difference if you have a measure that starts at zero, or if you start counting at zero. The measure band has a _point_ called zero.

      In a C array you have a _range_ between -1 and 1 which is called zero. A range can not have the 'length' zero. The analogy C programmers are using (that counts for all derived languages) is simply wrong. The only thing that saves the programming world us: usually we simply need an array of X items, we don't care if we count from 0 to X-1 or from 1 to X.

      In math zero means 'nothing' in C and similar languages it means 'first position'.

      Sorry, you are simply wrong and your example sucks :)

      If you're flipping through a book and you want to take an excerpt, you don't say "It's one paragraph, one page into the chapter on page 55", you say "Zero pages, one paragraph into the chapter starting page 55." 1-indexing would call page 55 the "first page". Indexes aren't ordinal, they're cardinal, so stop treating them like that with 1-indexing.
      That is complete nonsense.
      I suggest to go the next best book shelf and take a physical book into your hands. Seems you did not do that for a while. Best is to take a science book or lexicon, they often have an index.
      Page 55 is surprisingly page 55 and not 55 +/-1. Also the first paragraph in a chapter is the first paragraph, you never will find/google a citation for a paragraph zero. No idea where you got that retarded idea from.

      But, be happy. The simple minded have the future. No need for you to complicate your life and learn about linguistics, other programming languages and stuff how humans work.

      How did you number the drawers in your desk, btw? Is the left one the zero, or the right one?

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    32. Re:The Secret of Nim by diamondmagic · · Score: 1

      In math zero means 'nothing' in C and similar languages it means 'first position'.

      You're conflating ordinal and cardinal numbering again. It's undefined to add two ordinal numbers, i.e. "first plus second".

      Before you can add ordinal numbers, you have to convert them to cardinals, which start at zero because of the additive identity:
      First page of the chapter = zero pages past the chapter = pp0 + pp55 = page 55.
      Second page of the chapter = one page past the chapter = pp1 + pp55 = page 56.
      And so on.

      How great it must be, to be in elementary school, not knowing about the additive identity... (See, I can be condescending too)

    33. Re:The Secret of Nim by angel'o'sphere · · Score: 1

      If you believe so, good luck in you career!

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    34. Re:The Secret of Nim by IamTheRealMike · · Score: 1

      No, you didn't understand. I probably didn't explain well, but if you read the blogs then it's clear. They're talking about Ruby objects being manipulated from C. Memory allocated inside the C program is still manually managed.

    35. Re:The Secret of Nim by Blaskowicz · · Score: 1

      I found it great and easy to extract substrings with LEFT$, MID$ and RIGHT$. Too bad the keyboard input was shit (on PC) with 100 A$=INKEYS : IF A$="" THEN 100. Also I sucked at converting that Amstrad CPC game, spending like an hour converting the pixel coordinates from "(0,0) is on bottom left" to "(0,0) is on top left", all in vain as the program didn't work anyway. That is perhaps a bigger problem than the 1-arrays. Either way you will always have off-by-one issues, though for the demographics of pre-teen without internet access it's nice that A[1] to A[10] has ten elements.

    36. Re:The Secret of Nim by gumbi+west · · Score: 1

      I've been 1 indexing so long I'm confused. I never have any issues 1-indixing. I do for(i; 1; length(list)), but if I was using 0 indexing I'd have to do for(i; 0; length(list) - 1), which is a -1. But I've never had to do a +1 while 1-indexing.

    37. Re: The Secret of Nim by Anonymous Coward · · Score: 0

      Apl has QuadIo, a system environment variable. When set to one. Indexes are counted from one. When set to zero. I indexes begin with zero.

    38. Re:The Secret of Nim by angel'o'sphere · · Score: 1

      You only write it down intuitively in Python, while you are used/trained to it.

      Zero based indices are not intuitive. All your math background in school -- before you started programming --- was ONE based.

      Everything in real live starts with ONE, not with ZERO.

      There is no ZERO floor in a house. There is no ZERO parking slot etc.

      And to be frank, a 3 x 3 matrix has 9 elements, not count 0, 1, 2, 3 - oh that is 4 items - times 4 times = 12 elements.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    39. Re:The Secret of Nim by spitzak · · Score: 1

      There is no ZERO floor in a house.

      I take it you have never been to Europe?

    40. Re:The Secret of Nim by angel'o'sphere · · Score: 1

      I live in Europe.

      Brittsh count different than Germans, so the ground floor is their "first floor". In Germany the first floor (not everywhere though) is the first "upper floor" and the ground floor is called: well, ground floor.

      No zeros involved in either case. Ground floor is indicated in elevators usually with an E. Or in France sometimes with a P (parterre)

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    41. Re:The Secret of Nim by AlabamaCajun · · Score: 1

      COBOL can suck in Math, Science and Physics with the best of them. C# and C++ just make better tools for the task. If you had a business that ran COBOL as it's primary language and needed to add bridge design into the code then all you have to do is extend the language with an available OOL that the system supports. This ability was available back in version 85. You could also drop F# on a server and take it to the next level!

    42. Re: The Secret of Nim by Hognoxious · · Score: 1

      You should be able to set it yourself when you define the thing. Depending on he problem domain it could start from 0,1,32 or -273. Let the sodding compiler deal with the accursed memory locations.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    43. Re:The Secret of Nim by Hognoxious · · Score: 1

      Brittsh count different than Germans, so the ground floor is their "first floor".

      Wrong. http://english.stackexchange.c...

      No zeros involved in either case. Ground floor is indicated in elevators usually with an E. Or in France sometimes with a P (parterre)

      I've seen plenty of zeroes in France & Belgium, especially where there are basements or underground parking levels (-1,-2 ...)

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    44. Re:The Secret of Nim by angel'o'sphere · · Score: 1

      You have a zero on the elevator button, but no one calls the floor 'floor zero'.

      You should read the discussion on that article.

      I'm pretty sure that the brits call the ground floor first floor (as the discussion indicates) and it was a majour topic in school to learn the distinction ... as we germans in most areas count different.

      Anyway, point is, the zero in real live is not regularly used to count stuff. So claiming it would be natural to start arrays with zero is wrong. Especially considering the many counter examples in programming languages that either start with 1 or with an arbitrary value.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  2. Re:Such potential by Anonymous Coward · · Score: 1

    Or because some people don't want another variant of C++, like Rust.

  3. Scripting langs are like social media by Anonymous Coward · · Score: 4, Interesting

    A new fad sweeps through the kiddies every 3-5 years. I guess everyone wants to be one the crest of the new wave so they all rush out to learn the newest one, hoping maybe they'll get to write the book or teach a bootcamp, after it gets advertised on Slashdot of course.

    1. Re:Scripting langs are like social media by gbjbaanb · · Score: 3, Interesting

      I find the ones who rush to use the new stuff are the ones who never quite managed to make anything with the old ones. The grass is always greener but also they can blame their lack of progress on the tools.. obviously *this* time it'll be different, just once they've had the right training and given enough time.....

      Its when I was offered a job to make a system cope with the customer's increased load that I realised how damaging this is - it was written in Erlang, Ruby and Scala.

    2. Re:Scripting langs are like social media by smittyoneeach · · Score: 2

      If you were one to write books and training, you might welcome fresh technologies.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    3. Re:Scripting langs are like social media by Anonymous Coward · · Score: 0

      That's why I'm patiently waiting for Perl 6.

    4. Re:Scripting langs are like social media by BarbaraHudson · · Score: 4, Insightful

      If you were one to write books and training, you might welcome fresh technologies.

      +1 for cynicism, but I'll raise you 2:
      The other reasons why people go for this are two-fold.

      • 1. The whole industry is ADHD;
      • 2. It makes it easy to "abandon ship" for another job because your current project is over-budget and over-time and that's not going to change, and you have experience with the latest hotness;

      Bonus excuse: Since it's all new, nobody can tell at a glance that you're doing it wrong. :-)

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    5. Re:Scripting langs are like social media by c0d3g33k · · Score: 2

      Nim isn't a scripting language. It compiles to native binaries by default (with an intermediate conversion to C code) and doesn't depend on an interpreter or virtual machine at runtime.

    6. Re:Scripting langs are like social media by Lunix+Nutcase · · Score: 1

      If only the language was more "productive" they could get more done between complete rewrites of their software in the newest fad!

    7. Re:Scripting langs are like social media by Anonymous Coward · · Score: 0

      It generates C you twat!

    8. Re:Scripting langs are like social media by Lunix+Nutcase · · Score: 1

      i can generate C, too. And the way I do it doesn't require learning a new language and all its arcana.

    9. Re:Scripting langs are like social media by Anne+Thwacks · · Score: 0

      So why not write C in the first place, and save everyone a ton of misery?

      --
      Sent from my ASR33 using ASCII
    10. Re:Scripting langs are like social media by Lunix+Nutcase · · Score: 1

      That isn't hip and cool. C is old and boring.

    11. Re:Scripting langs are like social media by roman_mir · · Score: 1

      Funny stuff, just the other day I was telling one of my devs that I am already using a much higher level language than what is available to coders. I hire devs and I tell them what I want them to do. I am coding in the highest possible level ( available to me), I definr the tasks and explain the tasks to my devs in a human language, human coders understand the context of the tasks at hand and they have a sense of humour as well unlike the machines. Highest level langage for coding today requires a human to listen to the task and translate it to the machine.

    12. Re:Scripting langs are like social media by smittyoneeach · · Score: 1

      If I was being cynical, I'd point out that new languages are the chief means of pruning senior developers from the team and increasing profit margins.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    13. Re:Scripting langs are like social media by smittyoneeach · · Score: 1

      C is old and boring.

      In roughly the same sense as water.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    14. Re:Scripting langs are like social media by Lunix+Nutcase · · Score: 1

      True, but language hipster only care about hip and cool. Things that are old and boring (otherwise known as "stable" and "mature") just don't rate as cool.

    15. Re:Scripting langs are like social media by BarbaraHudson · · Score: 1

      Too true, there is that too. I guess I'm still not cynical enough :-)

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    16. Re:Scripting langs are like social media by Anonymous Coward · · Score: 0

      +1

    17. Re:Scripting langs are like social media by smittyoneeach · · Score: 1

      If not for the love of God, I'd probably go all Tony Montana.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    18. Re:Scripting langs are like social media by justaguy516 · · Score: 1

      A new language is not a technology.

    19. Re:Scripting langs are like social media by Anonymous Coward · · Score: 0

      So its a pretty printed C?

    20. Re:Scripting langs are like social media by Sun · · Score: 1

      If it has an intermediate C step, how do they handle exceptions?

      The original C++ compiler, Cfront, was abandoned precisely because of that reason: there was no sane way to handle exception without incuring costs at the good path. C simply doesn't have the facilities.

      Shachar

    21. Re:Scripting langs are like social media by gbjbaanb · · Score: 1

      Not at all, someone has to maintain the legacy systems that pay for the cool, new rewrites.

      And keep updating the legacy system when the cool, new rewrite gets scrapped for being way over budget and way under features.

    22. Re:Scripting langs are like social media by smittyoneeach · · Score: 1

      The definition of "technology" is so loosey-goosey anymore that your point is hard to defend.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    23. Re:Scripting langs are like social media by smittyoneeach · · Score: 1

      True, and truer.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    24. Re:Scripting langs are like social media by Anonymous Coward · · Score: 0

      Thrid option is to look at new languages because they're always promoted as being easier & more powerful, and one day there will be a language that'll live up to the hype.

    25. Re:Scripting langs are like social media by BarbaraHudson · · Score: 1

      But by then software development will be automated and programmers will be out of a job no matter what languages they know. I expect it in about 20-40 years.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
  4. Nim's community is very toxic. by Anonymous Coward · · Score: 5, Informative

    I lurk on the Nim IRC channel sometimes. The toxicity there is unbelievable.

    Look at these recent IRC logs, for example.

    We see insults like:

    17:46:17 ldlework EXetoC: the problem is that you're just spouting weightless and thoughtless generalizations about how you can whimsically avoid BlaXpirit_'s problems with magical design

    19:08:33 ldlework Your justification is piss.

    19:10:07 Zuchto BlaXpirit_: because ldlework is being an ass to the person that, as far as I know, is doing just that

    20:14:47 Zuchto ldlework: still being an ass, I would say that that makes any high ground you try and claim about being a "good internet citizen" pretty much null and void.

    And there's lots of unnecessary sarcasm:

    19:54:14 ldlework "Nim supports generics and inheritance but if you want to do OOP programming, Fuck You, Nim is really a functional language because we arbitrarilly limit the language to mirror limitations in F# (which show up for compltely unrelated reasons than in Nim)

    Then there's lunacy and quasi-psychotic ranting and rambling:

    19:58:39 Triplefox I like the modules as they are
    19:58:51 ldlework Triplefox: we're not trying to change the module system per-say
    19:59:06 ldlework And, great as long as they're sufficient for you, we should all shut up
    19:59:19 BlaXpirit_ damn you're good at arguments
    19:59:19 ldlework Let us remember to run by all our shortcomings with Nim through Triplefox first
    19:59:47 ldlework BlaXpirit_: because the actual answer here is "Oh right, just wait until forward type declarations."
    19:59:58 Triplefox Uh, so you want to bully?
    20:00:17 ldlework If Araq had just said that instead of taking some high-brow self-contradicting position for which he can provide no direct argumentation against, then we both would have been satisfied long ago.
    20:00:26 ldlework Because that's all that needed to be said about this problem.
    20:02:57 ldlework Triplefox: Uh, so you just want to sqaush other people's conversations that have no effect or bearing on you by making a wierd obersvation that you don't suffer the same difficulty as others?
    20:02:59 ldlework What?
    20:03:56 Triplefox Your conversation consists of forcing someone to say they're wrong
    20:04:06 ldlework Nope
    20:04:08 ldlework There is a problem X
    20:04:14 ldlework there is a sufficient solution Y
    20:04:23 ldlework But Y is purportedly bad because X shouldn't be a problem at all
    20:04:31 ldlework so instead of providing a solution to X
    20:04:32 ldlework we say
    20:04:34 ldlework You're wrong.
    20:04:37 ldlework You're thinking wrong.
    20:04:40 ldlework You're a bad programmer.
    20:04:42 ldlework Read this article.
    20:04:56 ldlework If there was a solution as nice as Y, that we were missing, everyone here would have provided it.
    20:05:03 ldlework Instead of the hand waving and high-browing.
    20:05:37 Triplefox Except that you're getting a change already
    20:05:45 ldlework Triplefox: right, that was my point, that's Y
    20:05:55 ldlework But we just had to pointout how people who need Y are terrible programmers
    20:06:06 ldlework Because there is some hidden unspoken thing you could do instead of X that would alleviate it
    20:06:16 ldlework Just it seems no one can actually produce what that altnerative is
    20:06:38 ldlework So the discrepency between "Shutup and just write your software correctly" and the blinding abscence of a simple solution being reported into the channel, speaks volumes.
    20:07:25 BlaXpirit_ this happens every time on this channel
    20:07:30 ldlework Maybe next time we can just skip the bullshit
    20:07:33 ldlework and talk about the engineering
    20:07:37 Triplefox Well, did you actually present the problem that requires your solution in a way

    1. Re:Nim's community is very toxic. by gnupun · · Score: 2

      Who cares? Do you want to use the language or chat with the community? Such people exist in most communities. AFAIK only one person, the creator of Nim (formerly Nimrod), Araq, is in charge of making all the decisions. He has also implemented most of the language and libraries.

      Nim = Python code + Turbo Pascal type declarations.

    2. Re:Nim's community is very toxic. by Anonymous Coward · · Score: 1

      Using a programming language often involves interacting with the community. When I need help with a problem involving a programming language, I'll usually go to that programming language's main IRC channel to ask my question. I'm more likely to use a language where I can deal with civilized adults who will help me find the information I need, rather than a bunch of youth or immature adults who will just insult me. Based on what the GP quoted, it looks like I'm more likely to get insulted when I ask for help in the Nim IRC channel. I don't want to explain what I need help with, and why I need to do something in a particular way dictated by my customer's requirements, only to be told, "Your justification is piss."

      Did you even read the quotes in the GP's comment at all, too? The guy named "Araq" will apparently make language changes just to stop the rampant arguing!

      Even the creator of the language says he makes language changes to avoid arguments, rather than because such changes improve the language:

      19:04:02 Araq ldlework: I intend to "fix" it because I'm tired of arguing ... not because it's a particularly good idea

      All of those quotes leave me very skeptical about the people involved with Nim. I'm pretty sure that I don't want to associate myself with them in any capacity.

    3. Re:Nim's community is very toxic. by OzPeter · · Score: 2

      I lurk on the Nim IRC channel sometimes. The toxicity there is unbelievable.

      Given that the language's name was initially Nimrod, I find those IRC logs quite apropos.

      --
      I am Slashdot. Are you Slashdot as well?
    4. Re:Nim's community is very toxic. by OzPeter · · Score: 4, Insightful

      Who cares? Do you want to use the language or chat with the community? Such people exist in most communities.

      The problem with the toxicity is this:

      19:04:02 Araq ldlework: I intend to "fix" it because I'm tired of arguing ... not because it's a particularly good idea

      If solutions are being based on emotion and not what is correct, or best, then the language development is well and truly fucked.

      --
      I am Slashdot. Are you Slashdot as well?
    5. Re:Nim's community is very toxic. by OzPeter · · Score: 1

      People still use IRC?.... It's probably not the Nim community so much as the kind of blowhards that are still hanging out on IRC in 2015.

      Did you not notice that one of those "blowhards" on the IRC channel was the language creator?

      --
      I am Slashdot. Are you Slashdot as well?
    6. Re:Nim's community is very toxic. by Anonymous Coward · · Score: 1

      Mozilla is a "big, soulless corp"? They're one of the most community-oriented, free-software-friendly people around and developed Rust 100% in the open. The Nim community really is toxic if people like you are going to smear good actors like Mozilla.

    7. Re:Nim's community is very toxic. by Anonymous Coward · · Score: 0

      If solutions are being based on emotion and not what is correct, or best, then the language development is well and truly fucked.

      Not so fast, cowboy. On the other spectrum of your argument you have languages which are logically perfect and horrible to use, because everybody just wants something that is illogical but practical. The alternative to being good to use (aka PHP) is sometimes not being used (Haskell, Erlang, etc).

    8. Re:Nim's community is very toxic. by Anonymous Coward · · Score: 0

      The forums? Where I'll have to wait days, if not longer, for an answer, assuming anyone even bothers to reply? That isn't going to work. I know that when I use Rust or Ruby or Python or even Perl, I can usually get an immediate answer to any question I have in the IRC channels, without snark and without attitude and without being insulted. I don't think that's possible with Nim. How does using the Nim forums help avoid the rotten people if the same ones mucking up the IRC channel are also found on the forums? They aren't going to magically become useful people just because the discussion medium changed!

      The only people I see launching a "smear campaign" against the Nim community are the people who make up that community. They're the ones getting quoted as saying some pretty obnoxious things, and engaging in harmful behavior. They're giving themselves a really bad reputation all on their own. Nobody else has to do anything, or is doing anything, to give them this bad image. They're projecting it by themselves!

    9. Re:Nim's community is very toxic. by Anonymous Coward · · Score: 0

      You've basically just proven the point that Nim's supporters are toxic by being toxic yourself. Nim is not superior to Rust. If you honestly believe so, then you simply haven't spent enough time in either, or have no need for Rust's advantages (which are many for some types of low-level software).

      That and your comment about Mozilla is so hyperbolic that I wonder if you actually just have a serious stake in Nim succeeding or Rust failing.

      I know I would rather deal with Rust's devs and core community than people like you; they've been almost alarmingly level headed and unbiased in my discussions with them, and have been putting far more thought into some very important things than I've seen on the Nimrod/Nim side of things over the years.

      Both languages have their purpose. If you MUST flail around trying to fight some corporate entity that could use more people rallying against them, go up against Go. That's backed by Google, who much better fit your mental model of a vague corporate enemy, plus Go is a lot more alike to Nim than Rust ever was.

    10. Re:Nim's community is very toxic. by Anonymous Coward · · Score: 0

      gnupun, are you the person going by the name "ldlework" in the quoted discussion? It's uncanny how closely ldlework's arrogance and snootiness in the Nim IRC chat matches that of yours here at Slashdot.

    11. Re: Nim's community is very toxic. by whopis · · Score: 1

      Is that because it was named after a great hunter, or because it was named after the leader of the people that built the Tower of Babel - leading to the multitude of languages? Or are you going the Bugs Bunny route?

    12. Re:Nim's community is very toxic. by drinkypoo · · Score: 2, Insightful

      AFAIK only one person, the creator of Nim (formerly Nimrod), Araq, is in charge of making all the decisions. He has also implemented most of the language and libraries.

      That's an excellent reason not to even consider using it at this point. Unless your idea of a good time is maintaining a dead programming language, you should wait until it already has a community and a fork before you even touch it.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    13. Re:Nim's community is very toxic. by Anonymous Coward · · Score: 0

      they're so toxic that a small bunch of programmers, working part-time and for free, have beaten a big soulless corp like Mozilla to create a language that is far superior to Rust.

      Mozilla can barely make a good browser, much less make a programming language that people should use.

    14. Re: Nim's community is very toxic. by OzPeter · · Score: 1

      Is that because it was named after a great hunter, or because it was named after the leader of the people that built the Tower of Babel - leading to the multitude of languages? Or are you going the Bugs Bunny route?

      Because it has been a well known slur for a long time. Bugs' use of it only reflects society.

      --
      I am Slashdot. Are you Slashdot as well?
    15. Re:Nim's community is very toxic. by Anonymous Coward · · Score: 0

      This is no different than my experiance with the Rust community.

    16. Re: Nim's community is very toxic. by alvinrod · · Score: 1

      Because [nimrod] has been a well known slur for a long time.

      Citation needed.

      There's a slang dictionary that lists it as a slang word for "penis" from ~40 years prior to it appearing in Bugs Bunny cartoons, but it doesn't appear to be used in that context in the cartoons. The Online Etymology Dictionary indicates that the term may have been used ironically prior to the cartoons to mock an individual as a poor hunter rather than it's original meaning of a great hunter, but notes that it wasn't until the 80's that it was widely used to mean an idiot, geek, etc.

      If you have evidence to suggest otherwise, please let me know. I couldn't find anything to support that claim after a few minutes of Google searching to support that it's been a well known slur (I can't recall hearing it recently so it may have fallen out of favor) outside of the generation that grew up using it. Seems far more likely that a cartoon unintentionally lead to the language shift because it used a reference that children were unlikely to understand as anything other than an insult.

      All of that aside, "nimrod" is at worst on the same level as "dork" or "geek" but is probably closer to calling someone a "doo doo head". Only a nimrod would try to insult someone by calling them a nimrod.

    17. Re:Nim's community is very toxic. by gnupun · · Score: 1

      I remember how people scoffed at Java when it was young. It was considered too slow, a new toy language and didn't allow programmers to use the preshius malloc/free and would be irrelevant within a few years. Boy, were they wrong.

    18. Re:Nim's community is very toxic. by InterBigs · · Score: 1

      This is a very valid point. I actually think it's typical for every 'hot new language'.. it always seems to take time for a community to mature into an open and polite one (if the toxic mentality doesn't cause the language to implode before that).

    19. Re:Nim's community is very toxic. by Anonymous Coward · · Score: 0

      1) The IRC is the place were the core developers engage.
      2) Rust and Nim are aimed at different problems.
      3) Mozilla is a non-profit foundation and openly develops its software.
      4) You are a idiot for not realizing 1-3.

    20. Re:Nim's community is very toxic. by Anonymous Coward · · Score: 0

      Have you never talked to Linus before?
      He'd kick you in the dick just for posting that post. He goes nuts in the mailing lists all the time.

      There is being "toxic" and idle banter and discussion on a topic and not crying like a little child because "oh noes he did a swear!"
      I don't want children in my development communities. They can stay in Tumblr and post suicidal gifs like they always do.

      It is like the difference between swearing at something and swearing at someone.
      Most communities accept the former, which is what all of this is.

    21. Re: Nim's community is very toxic. by c0d3g33k · · Score: 1

      Is that because it was named after a great hunter, or because it was named after the leader of the people that built the Tower of Babel - leading to the multitude of languages? Or are you going the Bugs Bunny route?

      Because it has been a well known slur for a long time. Bugs' use of it only reflects society.

      According to Wikipedia, citing the Dictionary of Jewish Usage, the use of nimrod as slang for dimwitted was first recorded in 1932, but was indeed actually popularized by Bugs Bunny in the 1940s. And apparently nobody knows *why* it became popular as an insult, because there's no real connection between the original meaning and the slang meaning.

      Nimrod: The Story of a Name

    22. Re:Nim's community is very toxic. by itzly · · Score: 1

      But it didn't hurt to wait for Java to prove itself.

    23. Re:Nim's community is very toxic. by Anonymous Coward · · Score: 0

      >toxicity toxicity toxicity

      I want SRS to leave.

    24. Re: Nim's community is very toxic. by Anonymous Coward · · Score: 0

      I doubt it is a "well known" slur everywhere and even if it was get over it.

    25. Re:Nim's community is very toxic. by Anonymous Coward · · Score: 0

      If this idlework person is in the dev team, then it's a dead project already. The drama and conflict will fracture the team and the language will die.

      Thanks for the copy/paste, I will now check if he is a dev, and if so, avoid this project like the plague.

      I've seen brilliant teams ripped apart by people like that, and dead languages are no fun.

    26. Re:Nim's community is very toxic. by Anonymous Coward · · Score: 0

      I made a commitment to Go and invested real time into it. It is an appealing language. After studying the complete language spec and using the language for two non-trivial experiments I abandoned it.

      The package system in Go is awful. There isn't one, effectively. This made achieving anything sophisticated into a battle of getting libraries to work.

      My experiments involved OpenGL on one hand and scraping a complex website on the other. Both led to struggles with libraries that took an excessive amount of time and left me feeling like the result was fragile. Less skilled users have no chance — none at all — of coping with this stuff.

      The language promulgators are aware that many people aren't happy with Go's package/module system. The problem appears to be that they fail to appreciate how important this is.

      They (Pike et. al) cannot appear in public without someone whining at them about it, yet after half a decade we're still 'go get' spamming source trees with arbitrary versions of dependency source that doesn't work half the time.

      I'm sure if I had limited myself to implementing web services I would have struggled less with Go. I want something more than a web server language, however.

    27. Re:Nim's community is very toxic. by drinkypoo · · Score: 1

      Boy, were they wrong.

      But Java was a moving target and you got to write once and debug everywhere for most of its early life. Even now there's some elements of that. So waiting for it to mature before depending on it was a very good decision.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    28. Re:Nim's community is very toxic. by Anonymous Coward · · Score: 0

      So you didn't touch C until you had this C++ "fork"?

    29. Re: Nim's community is very toxic. by KlomDark · · Score: 1

      You are a true nimrod

    30. Re:Nim's community is very toxic. by Anonymous Coward · · Score: 0

      And it was still considered too slow when it died.

      Possibly with the exception of long-lived server side stuff (JSP), which is also the only area Java isn't dead.

    31. Re:Nim's community is very toxic. by Anonymous Coward · · Score: 0

      These are the exact same quotes, taken out of context, as posted in a previous story. Your post is almost a duplicate of a previous post. I question that you act in good faith.

      Speaking as someone who has *actually* visited the IRC channel on several occasions, I find it to be very welcoming and friendly to newcomers - sarcasm famously doesn't carry over IRC/email, but the quotes above were part of a larger *technical* conversation between two devs who have been around #nim for a while. You seem to have omitted quotes that show they were passionately discussing a difference of opinion, not caustically ranting at each other like some sort of parody of a cable news program.

      17:49:49 ldlework You're usually more level headed than this, dunno why you're trying to seem so uninvested.
      17:51:35 BlaXpirit_ ldlework, so should i continue with 1 file?
      17:51:56 BlaXpirit_ u don't seem to think that this hierarchy is hopeless
      17:54:01 ldlework It wont be when forward type declarations show up
      17:54:09 ldlework And it wont be hard to refactor a monolith types.nim when that happens
      17:54:19 BlaXpirit_ ok
      17:54:30 BlaXpirit_ thanks

      Or from part of the conversation where you quoted one line:

      19:50:55 ldlework Araq: what exactly is the point of showing us this?
      19:51:37 ldlework F# is designed in way X so we see that projects in F# exhibit source organization features Y
      19:51:39 ldlework So?
      19:51:55 ldlework How is that at all related to types across modules being somehow a bad -software architecture-
      19:54:12 Araq and not that I really care but: cyclic graphs cannot be managed with reference counting, acyclic graphs can. that is an objective criterion. traversal for tree like structures is easy, for general graphs it's much harder etc etc etc
      19:54:14 ldlework "Nim supports generics and inheritance but if you want to do OOP programming, Fuck You, Nim is really a functional language because we arbitrarilly limit the language to mirror limitations in F# (which show up for compltely unrelated reasons than in Nim)
      19:54:32 BlaXpirit_ Araq, there are no reference cycles in my code
      19:54:40 ldlework Araq: so disable them within the module too, if that's your argument
      19:55:03 ldlework Use an argument that actually justifies the thing we're talking about _please_.
      19:55:13 Araq ldlework: no it's a *necessary* evil, not something you are proud of because of "software architecture"
      19:55:32 ldlework Why is it a necessary evil if not because of software architecture.
      19:56:14 ldlework How are any of the points you've actually responded with, actually related to the specific issue we're discussing, even tangentally?
      19:57:08 BlaXpirit_ still 0 valid arguments
      19:57:24 Triplefox I don't know, i actually read the article
      19:57:31 ldlework This article concludes, F# is better because it makes you go out of your way to create a cyclical dependency across modules.
      19:57:37 Araq trees are nice, general graphs are not. with Nim's restrictions you get a tree like module structure without them you get general graphs

    32. Re:Nim's community is very toxic. by Anonymous Coward · · Score: 0

      If by community-oriented you mean "fuck you, we are taking away features you need from Firefox and adding an ugly me-too interface" than sure.

      Mozilla is a bunch of arrogant ass-hats.

  5. Re:Such potential by gbjbaanb · · Score: 4, Insightful

    Or because some people can't cope with another variation on C++.

    They're just tools guys, all these languages coming out, its just like making slightly different style hammers, only hammers don't need any training or lengthy experience to develop decent skills to use.

  6. 20 years experience! by Anonymous Coward · · Score: 1

    Nim Programming Language, 20+ years.

    That's going on the resume!

    1. Re:20 years experience! by siddesu · · Score: 2

      You'll be having interviews with companies you most likely won't want to work for.

    2. Re:20 years experience! by BarbaraHudson · · Score: 2

      You'll be having interviews with companies you most likely won't want to work for.

      Hasn't that been true since at least the turn of the century?

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    3. Re:20 years experience! by Anonymous Coward · · Score: 0

      You'll be having interviews with companies you most likely won't want to work for.

      Hasn't that been true since at least the turn of the century?

      I don't know about the turn of the century. Most of my life, but YMMV. (60s or 70s)

    4. Re:20 years experience! by Anonymous Coward · · Score: 0

      Not for me, I haven't touched work since then.

  7. Re:Such potential by Anonymous Coward · · Score: 1

    What, you don't normally indent your C, C++, Java, C#, JavaScript or Perl code? You just left-justify every line? Is that why you're so against indentation?

  8. A good language that'll get slammed... by Jay+Maynard · · Score: 0

    ...because people don't like the idea of a language that turns something they should be doing anyway, code indentation, into a syntactic requirement.

    Short-sighted of them

    --
    Disinfect the GNU General Public Virus!
    1. Re:A good language that'll get slammed... by Anonymous Coward · · Score: 0

      No it's brilliant. Hipster coders don't need to know anything about programming style because they're not stuffy old programmers, they're coders.

    2. Re:A good language that'll get slammed... by Anonymous Coward · · Score: 1

      Actually they will be required to know about programming style without calling it programming style.
      In the end it will be just like large code bases in python: beautifully indented code that takes hours to decipher due to lack of programming style.

    3. Re:A good language that'll get slammed... by KalvinB · · Score: 1, Insightful

      Forcing code indentation is a sign you're going to be working with a bunch of "coders" who took a weekend course and not actual software engineers.

      If you need a language to force you to do what you should be doing and naturally do because of experience, then you're not very good at your job.

      There are far more important things in software engineering than being a white space nazi. Something that "coders" don't understand and it shows in their languages of choice.

      What's really pathetic about python is that while being obsessed with white space, it can't handle multi-line strings without escape characters. Derp. Indentation essential for readability. Being able to write SQL queries with proper indentation, not important.

      It's not surprising that most things people like about these "hip" languages are things you can do (and actually do) in any other language if you're actually skilled. And doing them in the "hip" languages is no indication of skill level.

    4. Re:A good language that'll get slammed... by Anonymous Coward · · Score: 0

      This anti-enforced-whitespace mentality is asinine. What do "good" programmers do anyway? Ensure their code is consistently/"properly" indented. So what's the difference? Are we really so bankrupt that we can't just ensure that our code is consistently styled, or MUST be able to style it a tiny bit differently? I'd say it's really only the bad programmers that complain about such things, not the "weekend coursers" (who will have bigger problems with the new language and probably SHOULD have something tell them what they're doing inconsistently).

    5. Re:A good language that'll get slammed... by narcc · · Score: 0

      Wait, are you one of those guys that thinks Python is "easy to read" because of forced indentation? I haven't seen them around in a while; I figured they all just forgot how to breath one day...

      More seriously, doesn't your editor have a pretty-print function? Did it magically make code "easy to read" when you used it on some badly formatted code in other languages?

      You do realize that Python's implicit blocks actually broke the language, right? Why do you think anonymous functions are crippled? Do you think it's because Guido likes making bad choices, or because he was too short-sighted to see how that decision could harm his language later?

    6. Re:A good language that'll get slammed... by gnupun · · Score: 2

      Forcing code indentation is a sign you're going to be working with a bunch of "coders" who took a weekend course and not actual software engineers.

      IMO, only lazy, inept, or noob programmers don't indent correctly. So if a language requires them to indent properly, they call it forced indentation because they usually don't indent correctly in other languages.

      If I'm wrong, how many different ways can you indent the following code?

      for x in range(1,10):
            for y in range(1,10):
                  if someCondition:
                          result[x][y] = a[x][y] + b[x][y]

    7. Re:A good language that'll get slammed... by Bander · · Score: 4, Informative

      Please stop, this is getting really tiresome. Python has multi-line strings without special escaping:

      http://stackoverflow.com/quest...

      You just look like an ignorant idiot with an axe to grind with this obsession over a non-existent problem.

      Speaking of obsessions, Python programmers don't obsess over forced indentation. It's the people who violently dislike Python who keep harping on it.

    8. Re:A good language that'll get slammed... by Carewolf · · Score: 1

      Forcing code indentation is a sign you're going to be working with a bunch of "coders" who took a weekend course and not actual software engineers.

      IMO, only lazy, inept, or noob programmers don't indent correctly. So if a language requires them to indent properly, they call it forced indentation because they usually don't indent correctly in other languages.

      If I'm wrong, how many different ways can you indent the following code?

      for x in range(1,10):

            for y in range(1,10):

                  if someCondition:

                          result[x][y] = a[x][y] + b[x][y]

      Read parent again.

      The issue is this:

      database.execute(
          "SELECT col"
          "FROM table"
          "WHERE y"
      );

      Correct SQL indentation, allowed and easy in a sane language, impossible to do in a stupid language with forced indentation rules that only applies the language itself.

    9. Re:A good language that'll get slammed... by Anonymous Coward · · Score: 0

      Please stick to one consistent argument, and don't try to bury one language for the unrelated sins of another. If you don't like Python for its implicit blocks, fine. But implicit blocks have nothing to do with enforced whitespace. For instance: http://nim-lang.org/manual.html#anonymous-procs

    10. Re:A good language that'll get slammed... by Anonymous Coward · · Score: 0

      What the heck are you talking about? Have you never actually used Python? That code would basically work in Python as-is, sans the semicolon. Where's the problem?

    11. Re:A good language that'll get slammed... by Megol · · Score: 1

      IMHO anonymous functions are crippled by definition. Just declare a local function and pass it instead. Better visibility and follows the structured programming model.

    12. Re:A good language that'll get slammed... by Waffle+Iron · · Score: 1

      You are aware that Python will let you arbitrarily indent code within parentheses like that to your heart's content? And that, contrary what the GP said, Python does indeed support multi-line strings?

    13. Re:A good language that'll get slammed... by Anonymous Coward · · Score: 0

      "SELECT colFROM tableWHERE y" not correct syntax. ;) /picky

    14. Re:A good language that'll get slammed... by Carewolf · · Score: 1

      "SELECT colFROM tableWHERE y" not correct syntax. ;) /picky

      Good catch. Should have tested my pseudocode before publishing.

    15. Re:A good language that'll get slammed... by serviscope_minor · · Score: 1

      It's the people who violently dislike Python who keep harping on it.

      I don't violently dislike Python. However, I'm not hugely fond of it and one of the reasons for that is the whitespace indentation. More specificaly, the lack of an explicit end-of-block marker makes it (for me) harder to visually parse the code structure. It also interacts poorly with vim, since the jump to beginning/end of block keys don't work as well as in C. Also, it makes copy/pasting code snippets awkward, and of course the "reindend this correctly" key doesn't work since it can't deduce the indentation from syntactic redundancy.

      The other problems are larger in that I like static typing for anything that's not a quick hack, but that's a more philosophical stance about the general class of language.

      --
      SJW n. One who posts facts.
    16. Re:A good language that'll get slammed... by caseih · · Score: 1

      Whitespace code indentation doesn't mean anything about the people you're going to be working with. Sometimes Python is used simply because it's an excellent tool.

      As far as I know Python has always had multiline strings. I don't know of any limitations in the multi-line strings that would preclude using them for things like SQL queries. They begin and end with """. I suspect you already knew that though.

      Python's indentation mirrors natural indentation anyway (braces would be superfluous), so in most cases, the code just looks normal, natural, and pretty darn close to executable pseudocode. That's why people like Python. You don't have to use or like Python, though. You can always use "Python with Braces!" http://www.pythonb.org/

    17. Re:A good language that'll get slammed... by Anonymous Coward · · Score: 0


      for x in range(1,10):

            for y in range(1,10):

                  if someCondition:

                          result[x][y] = a[x][y] + b[x][y]

      That's cute. Now imagine you received this code snippet from someone over email or IM or on a web forum with crappy formatting. Your friend has been very diligent in indenting the code in his source files, but unfortunately things just go bad over the wire. Now you have a snippet of code which has lost all its indentation.


      for x in range(1,10):
      for y in range(1,10):
      if someCondition:
      result[x][y] = a[x][y] + b[x][y]

      Still think this looks readable? I do not.

      Sure, I could make an educated guess and imagine that this snippet has an if statement, nested in a for loop, nested in another for loop. But my code editor can not make any such guesses, leaving me to fix the indentation by hand. For a small and simple piece of code of 4 lines, this is not such a problem, but what if it's 40 lines, or more even?

      If the language had an explicit code block delimiter then I would simply be able to hit a keystroke and my editor would be able to automatically figure out the code's structure regardless of the currently messed up formatting, and apply the proper indentation again. This way I do not need to waste my time trying to understand and fix badly formatted code. Instead I can use that time to try and understand well formatted code and the actual problem domain it's trying to solve.

      My gripe with python is not with the forced indentation itself. I love indentation and think everyone should do it religiously. My problem is that implicit code blocks based on white-space simply have a high chance of causing problems in many common situations. Any trimming or other modification of the white-space changes the very meaning of the code! This is very bad as these changes are very likely to happen.

    18. Re:A good language that'll get slammed... by reanjr · · Score: 1

      Forcing code indentation is LESS invasive than forcing semicolons and braces everywhere. You're already going to be typing that tab character in (if you're not, you're a shitty programmer). Why does the language need me to type in more fucking nonsense to understand what is obvious to anyone with a weekend of programming experience?

    19. Re:A good language that'll get slammed... by reanjr · · Score: 1

      ...says a person with fundamentally limited functional programming experience.

    20. Re: A good language that'll get slammed... by Anonymous Coward · · Score: 0

      Anonymous functions

    21. Re:A good language that'll get slammed... by gnupun · · Score: 1

      How is A.py better than B.py (other than saving one line of code)?


      # A.py
      a = [10, 1, 5, 20, ...]
      result = filter(lambda x: x > 10, a)

      # B.py
      a = [10, 1, 5, 20, ...]
      def greaterThan10(x):
            return x > 10
      result = filter(greaterThan10, a)

    22. Re:A good language that'll get slammed... by Anonymous Coward · · Score: 0

      If your email / IM client purposefully mangles whitespace, or if you copy/paste enough code from crappy web forums for this to be an issue, I'd say you've got more fundamental problems.

    23. Re:A good language that'll get slammed... by TheRaven64 · · Score: 1

      Because good programmers know that correct indentation is very important most of the time and a complete pain at other times. Someone higher up mentioned machine-generated code that includes snippets of human-provided code as one place where it's a problem. Code that's going to be interpreted and needs to be sent over the wire efficiently in source form is another. It's also annoying when you have long lines, as it's difficult to distinguish continued lines from indentation that implies code structure.

      Code that is intended for human consumption should always be clearly structured and should always have lots of documentation. Would it make sense for the compiler to reject any function that didn't contain a comment ratio above a certain percentage? It might make some code better, but it would make machine-generated code a complete pain to work with and add to the parsing time as the compiler skips past a load of /* added because otherwise the compiler will reject this */ code.

      --
      I am TheRaven on Soylent News
    24. Re:A good language that'll get slammed... by Anonymous Coward · · Score: 0

      Forcing code indentation is a sign you're going to be working with a bunch of "coders" who took a weekend course and not actual software engineers.

      In that case, maybe you shouldn't work for an employer who hires fuckwits.

      Oh wait.

    25. Re:A good language that'll get slammed... by KalvinB · · Score: 1

      Yep, found that. Apparently a lot of Python programmers aren't aware of the """ thing because I've only ever seen the obnoxious escape character used.

      And people keep harping on the forced indentation just like they keep harping on the lack of a start menu in Windows 8 because it's really annoying and adds nothing.

      And exactly, it's the noobs that don't indent properly. I'd like the language to not force it so they can be spotted easily. Having to force the indentation issue tells you you're working with a lot of noobs.

    26. Re:A good language that'll get slammed... by Anonymous Coward · · Score: 0

      So the language should be designed to trip people up just so you can gauge the experience level of other programmers.

      Right.

      Meanwhile, back on the grown-ups table...

    27. Re:A good language that'll get slammed... by fyngyrz · · Score: 1

      The second form is far more readable, does the same thing, and requires one less language construct and so is easier on the programmer.

      Anonymous functions are syntactic sugar. They have no programming value of their own.

      --
      I've fallen off your lawn, and I can't get up.
    28. Re:A good language that'll get slammed... by reanjr · · Score: 1

      So, even though software developers consistently say naming things is one of the most difficult parts of their job, and the thesaurus is one of the most useful books for a programmer, you want to introduce more pointless names? Why do you need to name something to understand it? Why can't you just understand the abstraction?

    29. Re:A good language that'll get slammed... by reanjr · · Score: 1

      The second form is only more readable if the greaterThan10 function is in some library somewhere globally available. Inner functions distract from reading code by breaking up control flow and computation. Now I have to at least skim that inner function as I'm trying to understand the outer function's behavior. It's noise. It doesn't belong there. It's like writing x = x;

    30. Re:A good language that'll get slammed... by Megol · · Score: 1

      Right. I've only used Haskell and ML.

      So exactly what does anonymous functions provide that local functions doesn't? I'm assuming a competent language with first class functions.

    31. Re:A good language that'll get slammed... by Megol · · Score: 1

      And you don't have to identify and parse the function definition in the first example?!?

      The first example is harder to parse at least for me. Not that it's a huge problem but readability problems tend to add up...

    32. Re:A good language that'll get slammed... by Megol · · Score: 1

      The problem isn't actually that they aren't named: it's that they in most languages use a syntax that's harder to read than a local declaration would be: often the declaration of the function is done embedded in a parameter block, often with another kind of syntax compared to normal definitions.

    33. Re:A good language that'll get slammed... by TechyImmigrant · · Score: 1

      You are aware that Python will let you arbitrarily indent code within parentheses like that to your heart's content? And that, contrary what the GP said, Python does indeed support multi-line strings?

      I am not aware. Can it? How? Not that I'd bother if it does allow that. I appreciate not farting about with begin-end or curly brackets.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    34. Re:A good language that'll get slammed... by gnupun · · Score: 1

      Why do you need to name something to understand it? Why can't you just understand the abstraction?

      The second question contains the answer to the first. That is, the effort spent by a programmer in naming code blocks helps other programmers, who have to read the source, instantly find out what the code is doing -- higher level of abstraction. Time spent reading code is a lot greater than time spent writing it.

      So, other than saving a few lines of code, lambda functions don't seem to have much benefit over local functions. It seems more a subjective matter of taste which one is better. Programmers who prefer functional programming languages like short, terse code, even if the execution speed is not much faster than ordinary procedural code.

    35. Re:A good language that'll get slammed... by Anonymous Coward · · Score: 0

      > More seriously, doesn't your editor have a pretty-print function?

      It's been a while since I last coded, but even that long ago there were already editors with command templates which indeed prettyprinted code. Some might even have alternative styles nowadays. Using a common notepad-like editor is an option, of course, but a poor one. If you use F/OSS why not get the best tool. If you use proprietary and have to pay -- or worse, face procurement, boy, your seriously fscked up! My condolences...

      > Did it magically make code "easy to read" when you used it on some badly formatted code in other languages?

      Yeah. That's it: code has a semantic difficulty, but form can get in the way. A more structured view can ease comprehension. I thought that was obvious. Some specialized CAD programs could do it for graphs and, in fact, I'd be surprised if it's not a mandatory feature in e.g. circuit design.

      > Do you think it's because Guido likes making bad choices, or because he was too short-sighted to see how that decision could harm his language later?

      Do you believe in intelligent design? Doing things right from the start? Intellectually superior human beings? Well, I don't.

      For me, it's evolution and getting it right the second time. Guido just had some good ideas and the energy to put them to work. That's kind of superhuman, sure, considering most of us can only talk. But it won't solve all the problems. Perhaps it's time for others to chime in and make Python better...

  9. Taste the rainbow by OzPeter · · Score: 1

    After seeing that first link I was left wondering what other colors can be applied to the text windows.

    --
    I am Slashdot. Are you Slashdot as well?
    1. Re:Taste the rainbow by OzPeter · · Score: 1

      Second link, dammit

      --
      I am Slashdot. Are you Slashdot as well?
  10. Numpy and Pandas by Anonymous Coward · · Score: 0

    I love the fact that this compiles to a binary linked to standard C library and how fast it is, but I'm in ass deep with Numpy and Pandas.

    And the code distribution problem is not that big of a deal. If I'm actually sharing code, 9 times out of 10, the other person has Python on their system because they are doing similar work.

    Anyway,when/if Nim matures more, I'll probably make the jump.

    1. Re:Numpy and Pandas by ceoyoyo · · Score: 1

      There are lots of ways to compile Python to C. You can just give your code a pyx extension and compile it with Cython, for example. If you want to distribute it to platforms without Python you'll have to use one of the static package makers as well.

  11. Re:Such potential by Anonymous Coward · · Score: 2, Funny

    Or because they don't want to cope with C++ even though they can. Because C++ is like the BDSM of programming languages.

  12. Re:Such potential by smittyoneeach · · Score: 1

    Because it's harder to do one-liners and code templates when the physical layout is significant. At least, that's one argument. Me, I love Python.

    --
    Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
  13. It's kinda strange by invictusvoyd · · Score: 3, Informative

    There's no Wikipedia page on this language. Just an external link in the disamb page.

    1. Re:It's kinda strange by ChunderDownunder · · Score: 1

      It's not notable because it doesn't have its own wikipedia page - it doesn't have a wikipedia page because it's not notable.

      Every time Jimmy Wales begs for a donation I cite shit like this. Small minded editors with way too much time on their hands who delete stuff for the sake of their own egos.

      The people's encyclopedia it ain't.

    2. Re:It's kinda strange by OzPeter · · Score: 1

      There's no Wikipedia page on this language. Just an external link in the disamb page.

      Well come on then you slacker, you could have created a new Wikipedia page in the same time that you wrote your comment here.

      On the other hand, it probably would have been reverted 5 minutes later for some obscure reason.

      --
      I am Slashdot. Are you Slashdot as well?
    3. Re:It's kinda strange by Anonymous Coward · · Score: 0

      It's in the stage of getting traction!

    4. Re:It's kinda strange by Anonymous Coward · · Score: 0

      Yeah, an obscure reason, like the fact that it has no significant coverage in independent sources. No, a slashvertisement doesn't count.

    5. Re:It's kinda strange by Lunix+Nutcase · · Score: 1

      Yeah, it's a got all of 2 documented users! OH MY GOD!!

    6. Re:It's kinda strange by wiredlogic · · Score: 1

      Because some militant mods on Wikipedia keep deleting it with the excuse that it isn't "notable". Note that they've also tried locking the disambiguation page to prevent external links or placeholders.

      --
      I am becoming gerund, destroyer of verbs.
    7. Re:It's kinda strange by Anonymous Coward · · Score: 0

      I bet you can get it added for a donation ;-)

    8. Re:It's kinda strange by Anonymous Coward · · Score: 0

      Is it not there because it was deleted or because it was never there? I'm guessing the latter, but if it is the former, this stands as a case in point why the heavy-handed among Wikipedia deletionists should be shot--and other deletionists be put on notice.

    9. Re:It's kinda strange by ChunderDownunder · · Score: 1

      Well since I posted the Nim page has been created!

      Whether it stays, we'll see.

  14. Re:Such potential by One+With+Whisp · · Score: 4, Insightful

    Why did you conveniently list only languages that use braces to delimit code blocks? The common "FIOC" complaints have never been about "muh braces", they're about making code blocks implied by indents rather than explicit. Braces are just one form of explicit block delimiters, but there are others. Ruby, for example, starts blocks implicitly with if, until, while, etc and ends them with "end". Despite not having braces, it's fine, because the blocks are explicit. The start or end of a block does not accidentally occur, where as this can happen all the time in python.

    By the way, what is python's way of handling grouped statements like these:

    for (int y = 0;y < height;++y)
    for (int x = 0;x < width;++x)
    {
            code here
    }

    Technically the inner for statement is within the outer for statement, but an annoying additional level of indentation can be avoided because the language doesn't require it. Besides, it looks nicer to the programmer. Even if you contest the need for this as two loops instead of one, just look at C#'s nested using statements, which are often on the same indent for simplicity.

  15. first the rats escape by l0n3s0m3phr34k · · Score: 1

    And now they have their own programming language?

    1. Re:first the rats escape by matfud · · Score: 1

      Thats NIMH.

    2. Re:first the rats escape by Anonymous Coward · · Score: 0

      But they are very smart rats.

    3. Re:first the rats escape by l0n3s0m3phr34k · · Score: 1

      I think the NIMH rats are the invisible angel investors behind this new outfit. They can't use the exact same name or MGM Studios would sue them; their FAR too smart for simple lawyer traps like that!

  16. Caveat Emptor by OzPeter · · Score: 4, Informative

    I was looking at the last link in TFS and in the comments to that link there was this little gem that should force you to take a large grain of salt before committing to a major Nim effort

    Nim High Priority Issues

    Now, I am not familiar with how other, similar languages were at the same stage of development, but given things like this I would be putting Nim in the "Not ready for prime time YET" basket (which is also how I feel about Swift at the moment - there seems to be too many things in a state of flux right now)

    --
    I am Slashdot. Are you Slashdot as well?
  17. So? by QuoteMstr · · Score: 5, Interesting

    Nim is just yet another statically-typed GC language with an unsafe escape hatch. I can get the same thing (and much better syntax) with Java and JNI or C# and P/Invoke. Yawn.

    Rust, on the other hand, is something genuinely new: it provides completely memory safety without a requiring a garbage collector at all. It's sad to seeing people switch from Rust to Nim: they're often too inexperienced to know what they're giving up, and I feel like they're seeking (syntactic) novelty, not a programming environment that's actually useful.

    1. Re:So? by gweihir · · Score: 1

      Rust sounds interesting. Got an overview-link?

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    2. Re:So? by swillden · · Score: 1

      The rust lang site c0d3g33k linked has all the information you could want, but I think the Wikipedia article is a great high-level summary: http://en.wikipedia.org/wiki/R...

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    3. Re:So? by silfen · · Score: 3, Informative

      Rust, on the other hand, is something genuinely new: it provides completely memory safety without a requiring a garbage collector at all.

      The only way to provide memory safety in a language without a garbage collector is to severely limit semantics. So, either the Rust designers are ignorant or the language is severely limited. In the case of Rust, Rust makes trivial memory allocation, the kind other languages simply optimize quietly for you, unnecessary complex, while failing to work in complex scenarios.

      Rust is a badly designed language.

    4. Re:So? by Anonymous Coward · · Score: 0

      Getting off the run-time installations that Java, C#, Python, Ruby, etc. all have IS the point of something like Nim (or D or Rust) to me. And I couldn't care less about P/Invoke, memory layout, pointer management, etc. I just want I good full featured language that eases high level programming and that compiles to machine code (no external requirements outside the core OS) for the platforms I target. Nim might fit that bill.

    5. Re:So? by Anonymous Coward · · Score: 0

      Well, compared to me it seems as though you know what's up.

      I took a look at the syntax and thought "wow, I wish they would have just extended Action! to the PC."

    6. Re:So? by defelsing · · Score: 1

      Nim is just yet another statically-typed GC language with an unsafe escape hatch.

      If that's the only criterion you have, then yes, Nim is "just another language". But there are many areas where Nim shines: Unique metaprogramming capabilities, short compile times, great interaction with C libraries, great performance, readability.

    7. Re:So? by sconeu · · Score: 1

      The problem with Rust is that you have to spin loop for any delay, because as we all know... Rust Never Sleeps.

      --
      General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
    8. Re:So? by Anonymous Coward · · Score: 0

      And after all the investment in learning the new language and porting the software, what actual benefits do the users of the software see? Do all those months of effort translate into a single noticeable benefit to them? All the things you list are just ways for some programming to justify wasting time rewriting working code so he can look hip and cool to the language hipsters on Github and Hacker News.

    9. Re:So? by serviscope_minor · · Score: 1

      Unique metaprogramming capabilities

      Would you mind expanding on that? I'm interested because between LISP, Haskell and D (specifically mixins, which I can't decide if they're incredibly awesome or incredibly stupid) and a scattering of others, the bar for unique metaprogramming is quite high.

      --
      SJW n. One who posts facts.
    10. Re:So? by Anonymous Coward · · Score: 0

      Wow, it sounds like you've certainly done your research, and are very familiar with what Rust is doing and how. I especially like your examples, and convincing arguments that Rust is unnecessarily complex. I mean, who even uses RAII anymore, or wants to have their code statically-verified at compile-time except by marking the unsafe bits as unsafe? Thanks, now I'm completely sold that you know what you're talking about, and that Rust is a badly designed language!

    11. Re:So? by defelsing · · Score: 1

      The first half of this article is basically about this: http://hookrace.net/blog/what-...

    12. Re:So? by IamTheRealMike · · Score: 4, Informative

      Wow, it sounds like you've certainly done your research, and are very familiar with what Rust is doing and how. I especially like your examples, and convincing arguments that Rust is unnecessarily complex. I mean, who even uses RAII anymore, or wants to have their code statically-verified at compile-time except by marking the unsafe bits as unsafe? Thanks, now I'm completely sold that you know what you're talking about, and that Rust is a badly designed language!

      I think he spelled out why he thinks Rust is badly designed. I haven't reached a conclusion on Rust yet ,but I certainly wouldn't be so bold as to say it's well designed, at least not yet. At best you can say it's an open experiment.

      First off, I'm not sure why you think RAII can't be done in a garbage collected language. For historical reasons C++ overloads the allocation of memory with the management of scoped resources hence the "resource acquisition is initialisation" name, but there's no reason that these tasks have to be joined together. Virtually all languages I know of have ways to do scoped resource management. Java has try-with-resources, C# has the using keyword, etc. The semantics are identical to RAII.

      Secondly, I'm not sure what you mean with the statement about unsafe. Yes Rust requires you to mark unsafe regions of code with the unsafe keyword .... exactly like C#. Java has the sun.misc.Unsafe class that lets you do manual memory management and arbitrary unchecked memory reads/writes, albeit without any native language syntax. This doesn't seem like anything fundamental to Rust.

      Now let's revisit silfen's criticism:

      Rust makes trivial memory allocation, the kind other languages simply optimize quietly for you, unnecessary complex, while failing to work in complex scenarios.

      Rust has a very complex set of rules that you must satisfy to make a program compile. "Fighting the borrow checker" is actually a thing in Rust. In some cases, the obvious way of writing a function that would work in any other language violates the language rules and requires workarounds. So let's not argue about this point specifically - Rust is a complex language and the lifetime management intrudes into even the most basic of programs.

      What about failing to work in complex scenarios? This one is arguable. Rust can express the semantics of any program, I do not believe there is any case where you cannot write a program in Rust that could be written in another language. So "failing to work" is perhaps a bit extreme. However it is undeniably true that for quite common design patterns the Rust lifetime/borrow checking infrastructure cannot apply and Rust programmers must either spend time thinking carefully about ownership design or fall back on the equivalent of reference counting smart pointers. My experience of reading online discussions is that Rust programmers tend to see this as a virtue and everyone else isn't quite so sure.

      The argument for Rust would be far stronger if it had been designed, say, 15 years ago, when garbage collectors were still very primitive. The problem Rust faces is that the key selling point of its design, the one that is used to justify all this unusual complexity, is "you can avoid garbage collection". But if you're working on a platform with modern garbage collector designs like the JVM or (to a slightly lesser extent) the .NET CLR, many of the old disadvantages of GC have been optimised away with time. On a properly tuned GC pause times are now very short even with large heaps, and some GC's like Azul or the new Red Hat developed Shenandoah GC don't actually have any pause times at all .... even with 200-300 gigabyte heaps. Google's ART runtime has shown that you can implement a concurrent compacting garbage collector on phones and get responsiveness that's basically as good as the iPhone. At least I don't perceive any obvious responsiveness difference o

    13. Re:So? by glwtta · · Score: 1

      It's sad to seeing people switch from Rust to Nim

      To be fair, it's not "people", it's just that one guy.

      --
      sic transit gloria mundi
    14. Re:So? by Anonymous Coward · · Score: 0

      You're lucky that this is Slashdot, and not Hacker News. If you'd posted something that informative, insightful, detailed and correct at Hacker News, the Rust Downmod Brigade would've taken you out within minutes of you posting it.

    15. Re:So? by Anonymous Coward · · Score: 0

      This is how you can spot a good programmer from a bad one. The bad one latches onto new languages because they are new. The good one ignores new languages until something truly useful comes along, which is very, very rare.

      Think of a mechanical engineer who sees a new hammer on the market. He has become extremely knowledgeable about hammers, so why would he run out and buy a new hammer because it has a slightly oblong shape, or a third claw? The lousy engineer will have a tool shop full of these bizarre hammers. The expert has just the best one that he knows how to use perfectly, and maybe a few others for strange situations.

    16. Re: So? by iluvcapra · · Score: 1

      I don't know if the GC problem is that terrible. Apple's clone of Rust, Swift, manages to work without a garbage collector and it's pretty straightforward, you just have to use type annotation to mark retain loops, other than that the memory model Just Works.

      --
      Don't blame me, I voted for Baltar.
    17. Re:So? by c0d3g33k · · Score: 1

      Rust, on the other hand, is something genuinely new: it provides completely memory safety without a requiring a garbage collector at all.

      The only way to provide memory safety in a language without a garbage collector is to severely limit semantics. So, either the Rust designers are ignorant or the language is severely limited. In the case of Rust, Rust makes trivial memory allocation, the kind other languages simply optimize quietly for you, unnecessary complex, while failing to work in complex scenarios.

      Rust is a badly designed language.

      CItation needed. Please give examples to support your assertion, along with alternatives of better design.

    18. Re:So? by Anonymous Coward · · Score: 0

      I never said that RAII isn't possible in a GC'ed environment. Nor did I even mention GC'ing in general - I simply pointed out that silfen wasn't exactly convincingme by broadly dismissing Rust, and that the ideas behind Rust are obviously worth exploring because we're dealing with them in almost every app. Sure this isn't trivial stuff, but at least someone is trying to innovate here, and all they're getting is badly-designed dismissals by people who seem to not even know about Rust's "unsafe" keyword.

      Does that mean Rust will prove broadly useful? Of course not. But if it can verify that 95% of resource-allocation in your app is done properly, that's 95% better than most apps ever get. The rest can be marked unsafe, and that's where you'd focus your efforts when you find leaks and such. Just throwing a GC and more hardware at the problem is tempting, but it's hardly solving the fundamental problem, it's sweeping it under the rug (no pun intended).

      If Rust can encourage us to not even need a GC in more systems apps, I fail to see why it's earning so much scorn. Should we just settle for sub-optimal languages and approaches because Rust isn't a panacea? Just let it work in the niches it settles into, and if it turns out to be worthless we'll know soon enough without having act like we really have a clue how "badly designed" it is.

    19. Re:So? by complete+loony · · Score: 1

      I'm still sitting on the fence about Rust, I haven't tried to use it in anger yet. I think the design is interesting, but the language syntax looks a little confusing.

      Rust programmers must either spend time thinking carefully about ownership design ... tend to see this as a virtue

      With some C, Java & .net experience I see this as mostly a good thing.

      Java and .net mostly convince you to ignore memory management, but often end up writing messy code in order to manage other resources. Or leave you with object graphs that can't be GC'd.

      C forces you to think about practically everything, but gives pretty good control over how objects are managed. What is on the stack, what ends up on the heap. But it's far too easy for a novice to shoot themselves in the foot.

      Looking at Rust, the OO developer in me sees the encapsulation, memory and resource safety that C is missing but laments that lack of exception handling. The C developer sees the level of explicit control that is often needed.

      But Rust is definitely a language I'd need to think about more when using. Hopefully that's something that will become more natural with use. It doesn't hide much from the developer. While I see this as a good thing, I think this will limit adoption.

      --
      09F91102 no, 455FE104 nope, F190A1E8 uh-uh, 7A5F8A09 that's not it, C87294CE no. Ah! 452F6E403CDF10714E41DFAA257D313F.
    20. Re:So? by Lunix+Nutcase · · Score: 1

      Well there was also the guy who's no-named company switched to Nim. It's an avalanche of users!

    21. Re:So? by Puff_Of_Hot_Air · · Score: 1

      I've never used Rust or even heard of it prior to this article, but your post here makes me hope that it gains mainstream acceptance. Modern Garbage Collectors are fine and work well in a large majority of uses cases but they fall down badly when the majority of your allocations are transitory objects of intermediate lifespan. Objects that last the length of the application run - fine, objects that are created and destroyed quickly - fine, objects that exist for the duration of an async I/O operation? Not fine. The GC becomes a scaleability bottleneck; the parallel processing eventually being throttled by that GC that can only run as a single thread (more or less). So systems that need high performance, large scalability and distributed networking etc are invariably written in C++. But in these C++ systems, ownership design is one of the most vexing issues and must be very carefully considered at all points, without any compiler support. The whole concept of threads and data ownership has exactly zero level built in conceptual support, and that sucks. It sounds as though Rust has been designed to resolve these issues for systems programmers. Which is a great idea.

      Your argument here seems to imply that Rust is this great replacement for Java, and then argue why that make no sense. But it seems to me that Rust is really a great replacement for C++, and the kinds of systems that cannot suffer the burden of a GC.

    22. Re:So? by Lunix+Nutcase · · Score: 2

      But in these C++ systems, ownership design is one of the most vexing issues and must be very carefully considered at all points, without any compiler support. The whole concept of threads and data ownership has exactly zero level built in conceptual support, and that sucks.

      I suggest you look into C++11.

    23. Re: So? by Lunix+Nutcase · · Score: 1

      That's because Swift is built upon the Objective-C runtime which uses reference counting.

    24. Re:So? by IamTheRealMike · · Score: 1

      The GC becomes a scaleability bottleneck; the parallel processing eventually being throttled by that GC that can only run as a single thread (more or less). So systems that need high performance, large scalability and distributed networking etc are invariably written in C++.

      Which collector are you using? Modern collectors like HotSpot G1 are parallel and concurrent, that is, they can collect using multiple threads simultaneously whilst the application is running. Give them more CPU cores and they will collect faster. The way to start tuning them is to specify how much CPU time you are willing to spend on collection and how short your pause times need to be. Allocate more time and the heap will be smaller. Allocate less time and the heap will waste more space (i.e. be larger) but the application will be faster.

      As I mentioned in my post, it's not true that systems which need high performance and large scalability are always written in C++. I've heard of multiple cases where large Java applications have GC'd heaps of several hundred gigabyte heaps and need a-few-milliseconds-or-less pause times. These tend to be apps in the financial industry for some reason. As another example I used to work at Google and they have quite a few very large, scalable systems written on the JVM, like the Gmail frontend web server.

      The whole concept of threads and data ownership has exactly zero level built in conceptual support, and that sucks. It sounds as though Rust has been designed to resolve these issues for systems programmers. Which is a great idea.

      Depends what you mean by resolve. Rust does static checking that data is only owned by one thread at once. If you need shared state then you are back to manual memory management again, as far as I know (Rust is a rapidly moving target so anything I say today might be out of date tomorrow).

    25. Re: So? by iluvcapra · · Score: 1

      Doesn't Rust use refounts?

      --
      Don't blame me, I voted for Baltar.
    26. Re:So? by Puff_Of_Hot_Air · · Score: 0

      Yeah, maybe you should re-read what I wrote before making assumptions. This is not a problem unique to C++, but something Rust appears to try and address.

    27. Re:So? by Puff_Of_Hot_Air · · Score: 1
      I think we are talking about different use cases.

      need a-few-milliseconds-or-less pause times

      That may as well be an eternity in any hard real-time application, or various finance systems as an example. The point isn't that you can't use Java/.NET in many many applications, it's just that there is a reason why C++ is still necessary for certain situations. This Rust thing looks like a potentially better systems level language (or it want's to be); addressing a number of issues that no language in this same space currently does.

    28. Re:So? by Puff_Of_Hot_Air · · Score: 1

      Depends what you mean by resolve. Rust does static checking that data is only owned by one thread at once. If you need shared state then you are back to manual memory management again, as far as I know (Rust is a rapidly moving target so anything I say today might be out of date tomorrow).

      Just as an addendum: This is the feature that is missing from all current programming languages that I am familiar with, and the principle reason why threads suck as a general concept. I can't look at any data object and know it's thread ownership. I have to infer that by understanding the rest of the program. This is why we end up with elaborate task based libraries, wrapping threads in "contexts" and being careful not to cross boundaries. What Rust is doing here sounds awesome, but I'd need to try it on some real project to see if it's actually useful. Still I greatly appreciate your critique.

    29. Re:So? by shutdown+-p+now · · Score: 1

      So far as I can see (and also from your link below), there isn't anything there that's not in D, except possibly for slightly better syntax. But syntax is a small enough thing, and given that D is already fairly mature and has a large community with several prominent people spearheading its further development and popularization, the rational choice would seem to be D.

    30. Re: So? by Megol · · Score: 1

      Reference counting IS a form of GC.

    31. Re: So? by BESTouff · · Score: 1

      Doesn't Rust use refounts?

      By default no, everything is stack allocated (which is of course way faster). But you can also easily use so-called boxed types which are heap-allocated, with various ownership modes. FWIW I'm really sold to Rust's concepts, but a bit less on the implementation: effectively as soon as you do half-complex things your implementation becomes not that readable, and not that easy to code. Maybe it's because I need more experience, I still don't know.

    32. Re:So? by Lunix+Nutcase · · Score: 1

      I read what you wrote. My point was that C++11 has added the very thing you didn't like that C++98 didn't have.

    33. Re:So? by Puff_Of_Hot_Air · · Score: 1

      Perhaps you should have tried to comprehend what I wrote then.

    34. Re:So? by Rich0 · · Score: 1

      Not being well-versed in either Rust or C++11, any chance that you could elaborate? Does C++11 not address the issues of data/thread ownership?

    35. Re:So? by IamTheRealMike · · Score: 1

      Well, you can easily lose a lot more than a few milliseconds inside malloc or free. So systems that are harder real time than that just can't allocate at all, normally, and of course you can build allocation free systems in a GC'd environment too. The GC will just never trigger.

    36. Re:So? by Puff_Of_Hot_Air · · Score: 1

      C++11 provides a new threading library which, don't get me wrong, I'm very happy about. I can finally write cross-platform thread related code without having to reach for boost or similar. However as with all languages (of which I am aware), that use threads, I can't simply look at a piece of code in isolation and determine if it is thread safe or not. There is no linkage between threads and data ownership. I still haven't had a chance to play with Rust, but what they claim is that all data is thread owned, so if you tried to write code that accessed the same variable from multiple threads it would not compile. The compiler catches the race conditions for you. Which sounds pretty good. Now in practise, you end up building fairly complicated abstractions on top of threads to avoid these kinds of issues (think tasks and contexts), so it'd need to be tried in anger to see if it made any real difference. Still it is very interesting and uniquely different.

    37. Re:So? by Puff_Of_Hot_Air · · Score: 1

      A millisecond is something like 4million instructions, so "a few milliseconds" can be a lot of work. A heap allocation that took a few milliseconds would be a significant concern. Also i think there is some confusion about "hard real time". Hard realtime simply means that a particular action must occur within a certain maximum time or the system is deemed to have failed. It's not about speed so much, such systems are generally running slower, it's about determinism. However it is correct to assume such systems are allocating memory less frequently. I'm getting the impression that you seem convinced that a GC has no drawbacks, only foolish critics. My own experience does not bear that out. One can work around the issues by using pooling and other techniques to prevent collections; but fundamentally a GC has a different mode of operation that means it works poorly for large numbers of objects tied to a medium term lifespan, suh as that crossing an I/O operation.

  18. Re: Such potential by Anonymous Coward · · Score: 3, Funny

    And suddenly C++ became much more interesting...

  19. Yawn by ealbers · · Score: 1

    You know, Yet Another Programming Language will not make you a better programmer....

    I've seen people buy the 'best' musical instruments thinking it will help them play better, it doesn't. Know what does? Practice,experience,time...
    Please stop making new programming languages....its silly and embarassing....just take some time, pick one and LEARN the craft.

    1. Re:Yawn by gweihir · · Score: 1

      But, you know, learning takes work and actual mental _flexibility_!!! I do not want to face my own insecurities by really learning something in-depth, I could find some of my limitations !

      That said, I completely agree. The tool can stand in your way, and sometimes it can even prevent you from reaching your goal. It cannot help somebody incompetent to become competent. In my opinion all these new languages are just a symptom of most programmers being pretty incompetent and on the permanent lookout for some language that fixes that, because they blame the language they are using and not themselves. Of course, such a language cannot exist. Becoming a better coder requires you to work on yourself, and the better you are, the more you see that language choice is a question of convenience, nothing else.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    2. Re:Yawn by Bander · · Score: 1

      I wouldn't claim to be a master, but I've been writing code for a while and like to think that I have a good grasp of the craft. I appreciate that you call it a craft, actually, because that word describes an intersection of pragmatism and art that I think well describes the activity.

      In any case, I enjoy learning new programming languages. I've written Conway's Life in more languages than I can count off the top of my head, just because it's a fun way to try to express well-known algorithms in new forms and contexts.

      I agree that no language will turn someone without the skill or inclination into a good programmer. But some languages are more fun than others, some are faster, some have better run-time validation. Like all tools, different ones have different strengths. Learning about each one is an interesting experience, even if I don't end up liking them.

      And then there are languages that I enjoy but nobody else seems willing to give a chance. Nobody on my team is willing to look at Clojure, for example, despite it's advantages over traditional Java syntax. "All those parenthesis, it's confusing!" (Never mind that Clojure code might have fewer delimiters than Java code that does the same thing). It's like the people who hate on Python for the forced indentation, they miss the forest for the trees.

      Being willing to learn new languages can open you up to new approaches to problems that you might not have thought of. It's also fun. So bring on the new languages!

    3. Re:Yawn by Anonymous Coward · · Score: 0

      What? Are you against us finding better languages than the cobbled-together crap we pretend is the end of the art because "it's good enough?" What a silly and embarrassing notion. Should we have just stopped with Short Code or machine language?

    4. Re:Yawn by TheGratefulNet · · Score: 1

      to write anything more than trivial test apps, you have to be GOOD at the language. and debugging it. and its portability issues (usually).

      so, while you are spending^Hwasting time learning a new language, the rest of us are busy making real things with tools that we have spent years mastering.

      I can tell a fresher from an vet with this attitude. the fresher wants to do 'cool things' even if it does not really help ship better product, faster. they convince themselves that this new tool or language will do that, but there's huge overhead and risk in it, not to mention - who else is going to support this new stuff? and if you and your team leave??

      sign of being junior: wanting to re-invent the wheel.

      sign of being senior: using tools you are expert at and not wasting time re-doing things that don't need to be redone.

      --

      --
      "It is now safe to switch off your computer."
    5. Re:Yawn by Bander · · Score: 1

      > so, while you are spending^Hwasting time learning a new language, the rest of us are busy making real things with tools that we have spent years mastering.

      Well, unlike some people, I'm capable of doing more than one thing in a day.

      I'm also capable of making abstractions and applying things learned in one context to another context.

      I'm not claiming these skills are useful to everyone, but they've certainly helped me hone my craft, and made me a more flexible programmer in whatever language my current project is using.

      Thanks for your judgements though. They'll be filed as appropriate.

    6. Re:Yawn by Lunix+Nutcase · · Score: 1

      You might have a point if not for the fact that these languages are just ADHD fads where the creator and its users just jump ship to a new fad every year or so. Get back to me when Nim has been around for 20+ years and has long running software using it.

    7. Re:Yawn by Anonymous Coward · · Score: 0

      Name 2 other languages that the creator of Nim created and abandoned previously within about a year.

      Or don't, and I'll conclude that you're just trying to pad your ego by telling yourself that everyone else trying new things is an idiot moron kid and the only way to do it properly is exactly how you do it.

    8. Re:Yawn by Lunix+Nutcase · · Score: 1

      Name 2 other languages that the creator of Nim created and abandoned previously within about a year.

      Which isn't what I said. Oh and the creator's own bio from a conference he was at proves what I said about these creators and users being just language fadsters that just jump from one obscure language to anther:

      Andreas Rumpf is the designer of the Nimrod programming language. He is a software engineer working at a top secret company and constantly attempts to create his own start-up. He has programmed in various programming languages over the years (including quite obscure ones) without being satisfied with any of them. Andreas Rumpf holds a degree in Computer Science.

      Or don't, and I'll conclude that you're just trying to pad your ego by telling yourself that everyone else trying new things is an idiot moron kid and the only way to do it properly is exactly how you do it.

      I couldn't care less what you conclude. I'm too busy writing software that is used by people rather than trying to impress people by writing toy programs in obscure programming languages.

    9. Re:Yawn by Anonymous Coward · · Score: 0

      I'm too busy writing software that is used by people rather than trying to impress people by writing toy programs in obscure programming languages.

      Somehow you've still got time to post bullshit assertions on Slashdot, though!

      Stop liking what I don't like

      And you'll probably reply to this, too.

    10. Re:Yawn by Anonymous Coward · · Score: 0

      "spendinwasting" is not a word, bird brain.

    11. Re:Yawn by Lunix+Nutcase · · Score: 1

      Obviously I was referring to my time doing my actual job. I don't work on Sunday because I'm not a sucker who allows their boss to give them no work-life balance. And I like how you ignored the first part of my posts. Guess you couldn't come up with a comeback in being shown that the creator of this language is just another language hipster?

    12. Re:Yawn by Anonymous Coward · · Score: 0

      > sign of being junior: wanting to re-invent the wheel.
      > sign of being senior: using tools you are expert at and not wasting time re-doing things that don't need to be redone.

      Let me offer you a quote from the "wise" George Bernard Shaw:

      "The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man."

      It's nice that you can distinguish junior from senior; I hope you know which you want to be in order to make progress happen.

      A vast array of problems that society has is caused by decisions which once were quite simple and naive. Now, many are afraid to reassess them in fear that society might crumble -- like a stack of cans at the supermarket.

      We are more important than our tools. If man becomes a cogwheel then society as a construct will have failed us.

      PS: I don't mean to be paternalistic, but the modern world and its continuously running mass production got me somewhat startled as of late.

  20. Oh, yeah, YAPL ... by 140Mandak262Jamuna · · Score: 0
    yawn. Yet Another Programming Language.

    Do the Developers developers developers chicken dance.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
  21. Re:Such potential by ceoyoyo · · Score: 1

    I've always thought that was the point.

  22. Re:Such potential by Anonymous Coward · · Score: 0

    Do you really think that is more readable? If I were looking quickly or from a little bit of distance, I would think those are two statements, not a nested one. In fact when I used to code in C I would put braces around the inner loop AND indent it, to be explicit. Maybe that's why I don't mind python at all, and in fact love it.

  23. I wonder if this is a kind of copyright protection by Karmashock · · Score: 1

    I mean, if everyone writes their program in their own little language then its pretty god damn frustrating for a rival to steal it from them unless they either want to learn that language or rewrite the whole thing.

    Ultimately, this might be the best copyright protection. Hard to steal what you can't understand.

    --
    I've decided to stop wasting my time responding to AC trolls/sockpuppets... so if you want a response from me... login.
  24. Re: Such potential by Anonymous Coward · · Score: 0

    Yes, and then I hit C-M-\ and it's all pretty again.

  25. Re:Such potential by Bander · · Score: 5, Insightful

    The second for loop should be indented. I have trouble believing that you really think the non-indented version is more readable, or conveys the algorithmic intent well. If you were applying for a job with my team and you made this argument, I would find it very difficult to hire you.

    Alternate interpretation: nicely trolled. I bit.

  26. Re:Such potential by gweihir · · Score: 1, Interesting

    That so many people dislike the Python indention model is not cause by it being bad, but by most "programmers" being rather clueless and inflexible. It does not take longer to get used to than the idiosyncrasies of other languages, and it does result in nicely indented code.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  27. Re:Such potential by Anonymous Coward · · Score: 1

    (not parent) My editor auto-(re-)indents the code following the blocks that I define unambiguously with { }. I can also cut/copy/paste working code between different nesting levels and it will still work, as-is, immediately, and the editor can re-indent them later so they look good. So when experimenting and refactoring code between spaghetti-code, loops, and functions, I don't lose time making sure the code is properly illuminated by a monastic scribe just to see if it works.

      It's also possible to paste code and lose all formatting in any web forum comment box, and it will still compile and work (and the human reading a snippet of code botched by the forum can also understand it, which is not even the case in an unformatted python code where all the structure is lost)

  28. Re:Such potential by narcc · · Score: 2

    Implicit blocks are bad, for many reasons which I'm sure you've already heard. The problems don't just affect developers, mind you, but the language as well. They're the sole reason why anonymous functions in Python are so horribly crippled, for example.

    The only reason Nim includes this retardation is that it's written by a guy convinced that the ridiculous mistake Guido made was actually a good idea. I get it: you like Python. Here's the thing, you like Python in spite of the ridiculous white space rules, not because of them. You've spent so many years defending that absurd design decision that you've convinced yourself that it's actually good.

    Oh, BTW, with a sensibly designed language, just about every editor out there can format code properly with a single keystroke. The only possible argument in favor of Pythons implicit blocks, forcing idiots to indent their code, is essentially meaningless.

  29. Re:Such potential by Anonymous Coward · · Score: 3, Insightful

    > What, you don't normally indent your C, C++, Java, C#, JavaScript or Perl code?

    OK, I'll bite. Not the OP, but I'm against *forced* indentation too.

    Programs have two target audiences: the compiler (I'll subsume interpreters here) and the human. Of those, the second one is the more important: a program must be written in a way that a human reader has a chance of convincing herself that it is doing the "right thing".

    That's why I enjoy having different channels. The indentation is for a human. Syntactic strukture is for both: compiler and human. And while there should be a tight correspondence between the channels (my editor helps in that), I enjoy tweaking the indentation from time to time to make a point towards the human reader.

    > You just left-justify every line? Is that why you're so against indentation?

    Nice red herring you have there.

  30. Re:Such potential by reactor451 · · Score: 1

    for y in range(height):
        for x in range(width):
            code here

  31. Re:Such potential by Anonymous Coward · · Score: 0

    er,

    for (y,x) in itertools.product(range(height),range(width)):
            things

  32. Re:Such potential by KalvinB · · Score: 1, Interesting

    "End" just reminds me too much of BASIC and Visual BASIC.

    Forcing indentation and not having multi-line strings (without the need for escape characters) are the two biggest oversights of these hipster languages. C# finally realized that SQL is a big part of modern coding and you need multi-line strings to make inline queries readable. Not every query needs to be a stored proc and you often need to write inline queries to do what you want for testing before you kick it over to the DBA to make it a stored proc.

    It's like MS releasing an operating system without a start menu.

    It's incredibly annoying, completely unnecessary and not that difficult to implement.

    DBA's do not appreciate having to remove your stupid escape characters rather than simply copying and pasting the query you wrote.

  33. Psssssssst! by Applehu+Akbar · · Score: 2, Funny

    The compiler for it is written in Swift. Pass it on!

    1. Re:Psssssssst! by gnupun · · Score: 3, Informative

      What, why is this garbage modded up? The Nim compiler is written in Nim.

      Compiling the Nim compiler is quite straightforward. Because the Nim compiler itself is written in the Nim programming language the C source of an older version of the compiler are needed to bootstrap the latest version. The C sources are available in a separate repo here.

      https://github.com/Araq/Nim

    2. Re:Psssssssst! by Anonymous Coward · · Score: 0

      Erm, Nim's tooling is written in Nim according to their webpage. Where did you get that Swift idea?

    3. Re:Psssssssst! by BESTouff · · Score: 1

      Yes right, this thread is a garbage collection.

    4. Re:Psssssssst! by segin · · Score: 1

      What, why is this garbage modded up?

      Because it's intended to be incorrect as a form of humor, which is lost on you, it seems.

  34. Re:Such potential by cjameshuff · · Score: 5, Insightful

    Thank you. The "why don't you like indentation?" argument is nothing but a ridiculous straw man...the issue is not the use of indentation to reflect structure (which, as you point out, Python actually interferes with in some cases...it gets worse with higher dimensional cases such as voxel maps), it's with the lack of properly delimited blocks. With blocks being implied by indentation, you lose an important visual anchor and cross-check of intent with the compiler, and what do you gain? Potential problems with tab characters, code truncation errors that are undetectable until you attempt to execute the code, huge headaches if you have to use code that has had its indentation broken...there are no positives here, unless the proponents are seriously objecting to the onerous burden of typing a few } characters or "end" keywords.

    Indentation significance is a design flaw, and it's disappointing to see it repeated yet again...

  35. Another language that has a fatal flaw by zJe · · Score: 5, Insightful

    Scoping by invisible characters is bad enough but modifying operator precedence by invisible characters? Why do people think that using spaces, the invisible character, as syntactically meaningful characters is a good idea? For readers of English the space is only important to separate meaningful bits and now we have a language that you will need to count spaces to determine operator precedence?!?! Of course it always cooler to use binary progressions so the operator precedence feature uses sequences of 1, 2 4, and 8 spaces. I can only hope that the language is a joke as per it's original name, nimrod.

    Maybe it would be useful if they dumped the space dependency, but after reading that I quit taking it seriously.

    1. Re:Another language that has a fatal flaw by hey! · · Score: 1

      Because nobody's ever managed to do anything useful in Python...

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    2. Re:Another language that has a fatal flaw by jdeisenberg · · Score: 4, Informative

      Here's the direct link to the section of the manual, for those who, like me, couldn't believe this: http://nim-lang.org/manual.htm... (see the section titled "Strong spaces") You have to explicitly say you want this experimental parser directive, but it's still a horrible anti-feature, as far as I'm concerned.

    3. Re:Another language that has a fatal flaw by matfud · · Score: 2

      The manual does not even hint at why the experimental strong spaces may be a good idea. As far as I can tell they are a way to confuse people.

      People do not learn arithmetic that way for a very good reason. You can't write it down reliably. I would claim that anything you cannot write down or write as plain HTML (as we are in the interweb era) is sort of broken.

    4. Re:Another language that has a fatal flaw by Anonymous Coward · · Score: 0

      Wow that looks awesome.

    5. Re:Another language that has a fatal flaw by Anonymous Coward · · Score: 0

      I bet you'd really hate the Whitespace programming language

    6. Re:Another language that has a fatal flaw by reanjr · · Score: 1

      How is (a+1)*b any more readable than a+1 * b ? Spaces aren't invisible; they take up SPACE. If you're not using a monospaced font, maybe there's an issue. But otherwise, it seems you're just whining about a feature you're not used to. Or maybe you're one of those programmers who has problems properly spacing their code in the first place. Maybe all your code sucks and languages like this are designed to avoid programmers like you?

    7. Re:Another language that has a fatal flaw by Anonymous Coward · · Score: 0

      Why would they do that? Adding extra syntactic rules for the sake of... what, removing a few tokens? It's not for the sake of readability, maintainability, or ease-of-use, which are all that ought to matter for the end-user. I could give a rat's ass about how pretty your damn language is.

    8. Re:Another language that has a fatal flaw by Anonymous Coward · · Score: 0

      I've done things like this before for the sake of symmetry:

      x = varAAAAA + varCCCCCC * varDDDDD;
      y = varG ____+ varF______* varZ;

      (imagine the underscores to be spaces; I can't find a character or any other means of getting Slashdot to allow those spaces, at least not as an AC)

      Now in Nim, I've potentially just fucked up operator precedence. What's worse, the error isn't immediately readable in a quick scan of the code, as parentheses would have been. I think that's important, considering the size of the code bases I work with. If you're making short little web applications built on scaffolds, maybe you don't care. I'm working with somewhat ungainly game engines. C++ templates and operator overriding fuckery is bad enough.

    9. Re:Another language that has a fatal flaw by fyngyrz · · Score: 1

      Furthermore, if your editor isn't brain dead, spaces and tabs should be clearly visible.

      They are in mine, and the editor I use is old.

      --
      I've fallen off your lawn, and I can't get up.
    10. Re:Another language that has a fatal flaw by JanneM · · Score: 2

      " 1 + 3 * 4 is still parsed as 1 + (3 * 4), but 1+3 * 4 is parsed as (1+3) * 4"

      What. The. Fuck?

      --
      Trust the Computer. The Computer is your friend.
    11. Re:Another language that has a fatal flaw by Anonymous Coward · · Score: 0

      I think they're trying to reduce the amount of parentheses people need to write while doing math.

      However, I agree that it's a horrible implementation. You won't be able to copy-paste any examples to the web as HTML eats extra spaces. Every pretty printer and auto-formater currently in existence will silently break any code using this feature! The logic doesn't change, so unless you have unit tests directly checking to see if the precedence changed you won't catch it and your code will have hard to find bugs. I think trying to write such unit tests is far more difficult that adding in a few "(" and ")".

      Enabling it can also breaks function calling. You can no longer add a space between the function name and the opening (. Personally I never do that, but I know some people prefer it. The point is enabling this feature can break existing code without the developer noticing.

      Lastly, their precedence table doesn't include "(" and ")", so how does combining both strong spacing and parenthesis work?

    12. Re:Another language that has a fatal flaw by matfud · · Score: 1

      Part of the concept of writing is to make meaning unambiguous. It is a very hard problem even in mathematics which is pure in and of its self (unlike spoken language). Over thousands of years it was figured out how basic algebra could be communicated well. How precedent worked. How to present it without ambiguity (more complex math still has specialized peculiarities) and now someone wants to fiddle with that using hidden characters? Do they even know how many non visible characters are in Unicode?

    13. Re:Another language that has a fatal flaw by matfud · · Score: 1

      Acctually it would be quite funny to have to use a code editor similar to wordperfect just to have the "display codes F4" popup to show the hidden meaning of all the whitespace :)

    14. Re:Another language that has a fatal flaw by Anonymous Coward · · Score: 0

      It's not insane: the idea is that since 1+3 are closer together iconically, then the sum should be computed first. It's a pretty terrible idea (imagine the errors that will generate) but it's not uninterpretable as a design move.

    15. Re:Another language that has a fatal flaw by Anonymous Coward · · Score: 0

      Yeah, but let me tell you Python quickly becomes a real pain when trying to collaborate with other programmers using different editors with different number of spaces in a tab. While it is possible to mix space and tab in Python blocks, it only works if you have tabs use eight spaces. If any collaborator uses a different number of spaces for a tab, and visually lines things up in their editor, viola the code doesn't run because the indentation now is broken because the invisible white space and tabs get mixed in the code.

      Yes, there are ways to ask Vim to put spaces, not tabs in the code, and, yes, you can convert spaces in to tabs with "col", but it's still a needless pain which could have been avoided had Python used keywords for blocks ("do...done", "if....then...endif", etc.) instead.

  36. Re:Such potential by dfghjk · · Score: 1

    "It does not take longer to get used to than the idiosyncrasies of other languages, ..."

    That is true.

    "and it does result in nicely indented code."

    Sure, 0.01% of the time. Bad programmers produce bad code in Python too and most would properly indent their code regardless.

    The fact remains that it's a BS design restriction even though it isn't nearly as hard to cope with as some claim. This choice shouldn't be made again.

  37. Not for everybody due to indentation by blind+biker · · Score: 5, Interesting

    nim, like python, requires strict indentation. That's not comfortable for some people. I, for one, have nystagmus and find it practically impossible to code in python. I suspect I'd have the same issues with nim.

    --
    "The agriculture ministry is not in charge of Gundam" - Japanese ministry official.
    1. Re:Not for everybody due to indentation by Shados · · Score: 1, Informative

      Lately, authors of new languages do it more for mental masturbation than to produce anything useful. And one of the things that get them off, is seeing how many tokens they can remove while still being able to parse it.

      Thats why so many new languages have python-like syntax.

    2. Re:Not for everybody due to indentation by reanjr · · Score: 0

      I feel for you. I feel even more for all the blind programmers who still manage to program in silly languages that require you to look at code.

    3. Re:Not for everybody due to indentation by reanjr · · Score: 1

      More languages are getting these types of syntaxes because people have broken free of the LL(x)/LR parser myopia from academia and are more comfortable with hand-coded parsers which are designed for the person who actually has to get shit done and not just write papers about ways in which other people can get shit done.

    4. Re:Not for everybody due to indentation by Anonymous Coward · · Score: 0

      Wow. That may actually be the first time anyone has ever advanced a decent argument against indentation-only blocking (as opposed to the crap brace-tards spew). I suppose if I had that, I'd get in the habit of counting spaces, and or using a vertical sight line (or piece of paper) to assist. But agree that in this particular case, it sounds like the redundancy of braces would probably actually be worth the cost.

    5. Re:Not for everybody due to indentation by Anonymous Coward · · Score: 0

      With more than 99% of those languages being used by no one of note.

    6. Re:Not for everybody due to indentation by Anonymous Coward · · Score: 0

      It's extra annoying because you can remove the colon after the if and loop statements and instead parse the newline character. The newline is required because the next line has to be indented, so why not use that? Why did they force everyone to type two extra keys: Shift+;

  38. Re:Such potential by Anonymous Coward · · Score: 0

    "End" just reminds me too much of BASIC and Visual BASIC.

    That is a bad argument.
    Basic languages also have infix notation for expressions, that doesn't mean that it is bad and should be avoided in languages. (Although it makes things a bit unclear since the precedence is implicit.)

  39. Re: Such potential by Anonymous Coward · · Score: 0

    My response to that is: if you need to indent that much or you have that much code in an indent then you are doing something wrong.

    most likely you can break out the complicated or log code into another method. That has the added benefit of being able to give the next guy a chance of understanding what the code was supposed to do. There's less variables to keep straight of and the method name should give a hint what is trying to be accomplished.

  40. Re:Such potential by ThePhilips · · Score: 5, Interesting

    As I have recently found out, that also affects the code generation.

    It is hard to generate Python code, without actually analyzing what's precisely is being generated. If source is 100% generated - it is doable, relatively easy. But generally generated code also contains pieces of user code, which might/might not require its own indentation and also reindentation to make it proper part of the generated code.

    If Python at least allowed optional block statement - curly brackets or begin/end or whatever. But nope. It is appears to be sort of a religious issue for the language creator and some of his followers.

    I personally do not like Python for that reason. I prefer to have a visual marker that block is closed. You know, like a dot at the end of the sentence.

    --
    All hope abandon ye who enter here.
  41. Convincing support by early adopters by mi · · Score: 4, Funny

    The author of "Unix in Rust" just abandoned Rust in favor of Nim

    Somebody, who wrote a book an a language I've never heard of, has now switched to another new language. Whether he has an agile and flexible mind or simply is not particularly loyal to anything, I'm not impressed...

    --
    In Soviet Washington the swamp drains you.
    1. Re:Convincing support by early adopters by Lunix+Nutcase · · Score: 1

      What? You're telling me that some random Indian programmer who has no history involved with the design or implementation of any version of historical version of Unix who is switching between obscure programming languages isn't a front page news story?!!

    2. Re:Convincing support by early adopters by Lunix+Nutcase · · Score: 1

      any version of historical version of Unix

      D'oh! Should be "any version of historical Unix".

    3. Re:Convincing support by early adopters by Zzzoom · · Score: 0

      Hey, he ported almost 750 lines of xv6 to Rust.

    4. Re:Convincing support by early adopters by Anonymous Coward · · Score: 0

      But...but...he's abandoning his 3-month-old project to switch to Nim!!! And didn't you read the story about the no-name who founded a no-name company who is switching to Nim?!! Clearly Nim is set for world domination!!

    5. Re:Convincing support by early adopters by Lunix+Nutcase · · Score: 1

      Clearly a master artisan.

    6. Re:Convincing support by early adopters by phibermon · · Score: 1

      He did what!?? Impressive. Makes you want to give up coding and go and pack boxes in light of such achievements.

    7. Re:Convincing support by early adopters by Lunix+Nutcase · · Score: 1

      And took 4 months to do so. This random Indian guy is at the peak of his craft.

    8. Re:Convincing support by early adopters by phibermon · · Score: 1

      I'll say! and here's me being impressed with 32k ray-tracers written in assembly. I've not lived.

  42. Re:Such potential by TheGratefulNet · · Score: 4, Insightful

    I just recently learned python (learned it from a top python core developer, though, if that counts any).

    I like the language. almost all of it. BUT, the lack of curly braces was a huge mistake. indentation is fine. we all agree its needed.

    here's where 'whitespace only' indenting messes up. ever see what blogs do when you try to post code? yeah. that. and its a reality, too. you will never be able to guarantee that posted code won't be 'changed' by some web formatter or email formatter!

    twice in the last 2 months I've had to extract posted source (from clueless posters) and FIX their code since it did not run OOTB. I had to GUESS where things were supposed to be nested. its not obvious; if it was, you would be able to strip all spaces out and still be able to get the same meaning.

    guido just did not think about this issue. its ok, he thought about most things, but I wish he'd man-up and admit that in THIS case, curlies are truly needed. keep the rest of the forced indenting, but ADD an open and close curly so that the meaning is crystal clear, even if mis-posted or mis-indented. plus, you would be able to re-format the source to your local google 2-space standard or the rest-of-world 4-space standard.

    oh, and it would not really hurt if you did have static data types. there's huge value in:

    int foo (int a, char b, float c);

    if you just tell me you are sending a,b,c into a routine, there's a lot that I should know that you're not telling me. it was a shame to lose this. not sure the 'power' you gain is worth the loss of immediate documentation (in the code) by declaring the types of each var and having that var always (for its scope) be that data type.

    --

    --
    "It is now safe to switch off your computer."
  43. Re:Such potential by TheGratefulNet · · Score: 2

    I agree. it needs the curlies (which WORK great in C and takes up at most 3 chars; 1 for the curlie and 1 for a space before and after. 3 extra bytes for intro and maybe 3 for exit. 6 bytes. big deal. you should 'waste' more space with comments and vertical/horizontal whitespace, just for readability, alone.

    it should have been optional. require indentation, fine. but also ALLOW those of us who like seeing an 'open and close' semantic who is explicit (not just implied) would have been the right thing to do.

    someday, maybe guido will come to his senses. if/when that happens, a lot of us will breathe a sigh of relief. and then, posted code on blogs, emailed code, etc, will still be runnable without GUESSING what the source was before the formatter destroyed it.

    --

    --
    "It is now safe to switch off your computer."
  44. Re:Such potential by Anonymous Coward · · Score: 0

    THIS is a strawman. It's not like syntax doesn't interfere with you in other languages (often in terrible ways). But of course you're so used to those things in the other language that you'd rather not learn the annoyances of another language, huh? Saying it was just about the "onerous burden" of not typing a couple of braces is also mental. You're going to argue that writing a couple of unnecessary braces is a better approach than relying on the indentation you're already supposed to be doing instead? Python may have its flaws, but the general idea you're rallying against isn't one of them.

  45. Why do we need another programming language? by Anonymous Coward · · Score: 0

    To create c code?

    1. Re:Why do we need another programming language? by Lunix+Nutcase · · Score: 2

      Someone has some books and training courses to sell to language hipsters.

  46. Re:Such potential by Bander · · Score: 4, Insightful

    Python has multi-line strings. I know that fact won't change your mind, but it might help you look less ignorant.

  47. Re:Such potential by gweihir · · Score: 1

    You are confused. Hint: "fact" != "subjective opinion".

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  48. Re:Such potential by DoofusOfDeath · · Score: 1

    If nim has that much going for it otherwise, we could always create a new language, nim++, which is just a front end to nim and translates { and } to proper indentation. (Assuming nim doesn't use { and } as tokens)

  49. Re:Such potential by beelsebob · · Score: 2, Insightful

    Oh god oh god, please don't do that. Not indenting the inner loop here is horrifically unreadable.

  50. Re:I wonder if this is a kind of copyright protect by fisted · · Score: 1

    Yes, because people who care about that generally release their source code.

  51. Re:Such potential by gweihir · · Score: 0

    Your examples are not convincing. Clueless posters will always mess things up, including omitting necessary braces. Python makes this neither worse nor better.

    As to static typing, that is a tool to help beginners. It is not a requirement for a good language at all, as its absence also has rather strong advantages. If you want/need static typing, do not use Python. Really.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  52. Re:Such potential by orlanz · · Score: 5, Informative

    OK, you can consider Python as a heavily standardized version of indentation. Python's entire objective is the human reader. It doesn't leave you and 10 other developers from "tweaking the indentation from time to time to make [their own] point toward the human reader". What people don't understand is that one's interpretation of what they write could be different from others. What one finds easier to understand, others find harder.

    There have been countless times that I have read really good Java and C code and could start picking out which individual developers developed where. Do you know how much start up time is wasted in learning Dev1, Dev2's... DevXs' version of the C language? And if you touch C++... each dev has "minor versions" as they learn new ways of doing the same thing. And these code reviews are done in highly standardized environments with docs and comments. Still each developer gets their own unique version of a standardized language. And don't get me started on Perl or Ruby. There are no such things, there are just a ton of individual essays that the Perl and Ruby interpreters understand and execute.

    With Python, there is still a lot of uniqueness among developers, but you really need to look for it at the higher levels. Like method & class relationships, program execution flows, or logic design. But at the low level of reading & understanding code from a team of developers, it is dead easy. There are slight variations, but not enough to need to learn that style of coding to help in the future. That is the benefit of Python, its a global coding standard that's built into the language itself. Something that development companies spend far too much money [re]implementing every year for their dev teams.

    Now, I am not saying this is best or the way it should be done. Its just one standard where none really exist.

  53. More attention? by QuietLagoon · · Score: 1

    ...has been getting more attention recently...

    Well, if it is a new language, by definition any attention it gets, no matter how little, is "more attention".

    .

    When the comparison is against zero, it does not take too much to have a 100% improvement. :)

    1. Re:More attention? by fahrbot-bot · · Score: 1

      ...has been getting more attention recently...

      Well, if it is a new language, by definition any attention it gets, no matter how little, is "more attention".

      .

      When the comparison is against zero, it does not take too much to have a 100% improvement. :)

      ...has been getting more attention recently...

      Well, if it is a new language, by definition any attention it gets, no matter how little, is "more attention".

      In addition, claiming "more attention" by submitting a post containing several links to articles about the subject seems a little astroturfy. While certainly a small circle, neither I nor anyone I know has heard of this language until now, and still probably won't ever care.

      In addition, this tidbit, from the Nim homepage, under "Nim is elegant" make's it a no-go for me:

      Statements are grouped by indentation but can span multiple lines. Indentation must not contain tabulators so the compiler always sees the code the same way as you do.

      As with Python, this is retarded and unnecessary.

      --
      It must have been something you assimilated. . . .
    2. Re:More attention? by Anonymous Coward · · Score: 0

      Hacker News has carried a lot of Nim articles lately. I guess it's a well-orchestrated publicity effort by the developers. It is weird, however, that they put all that effort into publicity but didn't manage to write a Wikipedia page.

  54. a language with a gimmick by silfen · · Score: 1

    Nim is the only language that leverages automated proof technology to perform a disjoint check for your parallel code.

    That's a useless gimmick: it can't work in general and either fails or limits the kind of correct code you can write, you don't always want these kinds of checks, and it must take a significant amount of effort on their part to maintain it. The fact that they highlight this at the top of the page suggests to me that they aren't focusing on the right things and that the language may be in trouble before it even gets started.

    1. Re:a language with a gimmick by Anonymous Coward · · Score: 0

      Given that this gimmick doesn't seem to be mentioned anywhere else in their documentation (I tried poking around to see which provers they use), they don't seem to actually focus on this. But I might be wrong, maybe the devs are just really not interested in documentation.

    2. Re:a language with a gimmick by Anonymous Coward · · Score: 0

      That's a useless gimmick: it can't work in general and either fails or limits the kind of correct code you can write

      That depends. They might require you to write something like this if the system can't prove that objects a and b are distinct:

      if not distinct(a, b):
          throw MightHaveCausedADataRaceException
      spawn(f(a))
      spawn(f(b))

      Then the system can always prove that there are no data races; but it won't prove, in general, that MightHaveCausedADataRaceException is never thrown.

  55. Re:Such potential by Crashmarik · · Score: 1

    So you think hammers are trivial ?

    http://s1.cdn.autoevolution.co...

  56. Re:Such potential by znrt · · Score: 1

    DBA's do not appreciate having to remove your stupid escape characters rather than simply copying and pasting the query you wrote.

    what's the point of having a dba simply copypasting the queries you write?

  57. What's special about Nim? by Patrick+May · · Score: 1

    It's Greenspun's 10th Rule applied to Python. Nothing here that hasn't been in Common Lisp for decades.

    1. Re:What's special about Nim? by serviscope_minor · · Score: 1

      That's the thing though: why did LISP never take the world by storm?

      I have ideas on the matter, but basically even though LISP does everything the way it does it is more computer friendly than human friendly.

      --
      SJW n. One who posts facts.
  58. Re:Such potential by orlanz · · Score: 4, Insightful

    Right... and I have seen this same code written in the following versions:

    for (int y=0;yheight;++y) for(int x=0;xwidth;++x) code here

    for (int y=0;yheight;++y) {
        for(int x=0;xwidth;++x) code here
    }

    for (int y=0;yheight;++y) {
        for(int x=0;xwidth;++x) {
            code here
        }
    }

    for (int y=0;yheight;++y)
    {
        for(int x=0;ywidth;++x)
        {
            code here
        }
    }

    You ask C devs how they would write it, and you will see they spread out across the above. Of course this is an overly simple example.

    Python folks will mostly gravitate to reactor451's version. Are there other versions? Yes, especially when you add in iterators and generators, but for even those, developers will gravitate to ONE version of it totally dependent on if they use that feature in their coding.

    #Python 3.0+
    for y in range(height):
        for x in range(width):
            code here.

    And if this is too far in indentation, then the Pythonic way says that your code is already too complicated and this section of the code should really be delegated away in its own method.

  59. Re:Such potential by znrt · · Score: 2

    it should have been optional

    this could be easily added without breaking compatibility. you could even write a preprocessor, if it bothers you that much. it is indeed a big constraint with little or no benefit, but most python users seem not to mind, or even like it. many languages have made some of such arbitrary decisions that are purely idiosyncratic, usually pointless but defended with zeal. if the language has other values you simply live with it or hack your way around.

  60. Re:Such potential by buchner.johannes · · Score: 4, Insightful

    I agree. it needs the curlies (which WORK great in C and takes up at most 3 chars; 1 for the curlie and 1 for a space before and after. 3 extra bytes for intro and maybe 3 for exit. 6 bytes. big deal. you should 'waste' more space with comments and vertical/horizontal whitespace, just for readability, alone.

    Haha, here you all complain that Java is too fluffy, but if a language reduces the fluff it is also not good?

    In the case of Python, instead of intro/outro curled brackets or begin/end statements AND REDUNDANTLY indenting, using only one of the two was chosen. Why do it twice.

    --
    NB: The message above might reflect my opinion right now, but not necessarily tomorrow or next year.
  61. Re:Such potential by ShanghaiBill · · Score: 3, Informative

    Me, I love Python.

    Me too. But in spite of the indentation, not because of it. Indentation gets goofed up all the time. For bracketed languages, you just run "auto-indent". For Python, you interrupt your train of thought for ten minutes while you debug the whitespace.

  62. Re:Such potential by orlanz · · Score: 1

    The instances of "bad code" in Python is minuscule compared to other languages. With Perl and Javascript being on the other end of the spectrum. Saying "Python too has bad code so its the same" is misleading. Python programs not only learn a language, they also learn one standard of coding in becoming proficient in the language. With C/Java/C++/Perl/Pascal/COBOL/Ruby, folks learn & develop various standards of coding on their own and at different companies.

    Each reviewer now has to learn that new standard to figure out what the coder is doing. I have said "it's a BS design restriction" for one project written in one language multiple times. Cause each developer due to their various backgrounds choose a different design for their coding.

  63. Re:Such potential by Anonymous Coward · · Score: 0

    Having the language coercing people into using a single style is not a positive aspect of that language. Christ, that same line of reasoning is what managed to turn golang's syntax ruleset into the absolute feces it is today.

  64. Re: Such potential by Blackeneth · · Score: 1

    Then you don't gave 1 standard - you have 2.

    --
    -- Knowledge is power. -- Francis Bacon
  65. Re: Such potential by Anonymous Coward · · Score: 0

    But python has support for that already! You can use whatever delimeter you want! Watch:


    for i in range (20):
        #{
        print i
        #}

    See how easy it is to implement curly braces for code blocks in python? It's amazing how much support python has for the syntax of other languages!

  66. Holy Fuck by Anonymous Coward · · Score: 3, Funny

    Yet Another Programming Language.

    Same shit, different syntax.

    And now, some HR idiot is looking for someone with 5 years experience in it.

    1. Re: Holy Fuck by Anonymous Coward · · Score: 0

      HR idiot

      So true

  67. Re:Such potential by ThePhilips · · Score: 2

    Haha, here you all complain that Java is too fluffy, but if a language reduces the fluff it is also not good?

    Oh this hipster coders.

    Syntax is not fluff.

    Wrappers for wrapper for adapters for wrappers - commonly found in the huge, so called "enterprise" software, is fluff.

    In the case of Python, instead of intro/outro curled brackets or begin/end statements AND REDUNDANTLY indenting, using only one of the two was chosen. Why do it twice.

    Language is a tool.

    It should give me, the developer, the choice - not take it away from me.

    --
    All hope abandon ye who enter here.
  68. Re:Such potential by Anonymous Coward · · Score: 0

    Note that the problems you mention are about Python, not about Nim. Essentially you care about runtime problems because you mixed some spaces or whatever. Since Nim is a compiler the indentation is checked just like you would with C or Java at the compilation phase. You can fuck up braces with indentation too and *think* the code is doing something while the compiler disagrees.

    The gains you have are much less typing and clutter free code for readability. But if readability is your concern, you could troll then with Nim supporting macros... programmers who don't know better than C/C++ always hate macros.

  69. Re:Such potential by Marginal+Coward · · Score: 4, Insightful

    Python's block structure isn't about saving characters or about saving typing. It's about "There should be one-- and preferably only one --obvious way to do it."

    In C, for example, there are multiple ways to place braces. In fact, there's even a lengthy Wikipedia page on that very subject.

    In my own case, I have always used the K&R style, but my employer requires the Whitesmiths style. I have a large base of code at home that I wrote and maintain in the K&R style, and it's hard to switch back and forth between the two on a daily basis [sigh].

    Python's indentation is utterly Pythonic because it is compact, yet meaningful. It carries blocks to their logical conclusion. I started in Pascal with begin/end, then learned that braces were better in C, then learned that no braces were best in Python. QED.

  70. real cost benefit new language by cinnamon+colbert · · Score: 1

    can someone explain to a non programmer, as you look back over the last 20 years or so, what is the real cost/benefit of new languages
    I mean, i read constantly of hip new languages; but there is a cost that no one seems to talk about, eg you need new libraries, maintenance of a new language. etc

    are we, the users really that much better off ?
    am i, a user, really getting more for my dollar from all these new languages ?
    as a user, i care about cost/performance; curly braces, indents, static typing - totally irrelevant

    1. Re:real cost benefit new language by Anonymous Coward · · Score: 0

      You as a user get no benefit. You just get buggy software from people constantly trying to rewrite crap in the Fad of the Week.

    2. Re:real cost benefit new language by Megol · · Score: 1

      User as in end user or user as in programmer? There's a big difference...

    3. Re:real cost benefit new language by iggymanz · · Score: 1

      How many of the new languages introduced to the world in the past 20 years have gained huge traction and massive user base? Java, PHP, C# (some would argue its just a warmed-over java though)...are there any others I forgot?

      Plenty of "flash-in-the-pan" new langauges have come and gone, leaving just niche users.

    4. Re:real cost benefit new language by gnupun · · Score: 1

      are we, the users really that much better off ?

      I would think so. Let's look at the evolution of programming languages:
      a) machine code - The language of the CPU (1s and 0s) but very hard for humans to read and write. So it takes a lot of time to get anything done.
      b) assembly language - Same as machine code but easier to read and write. So it takes less time than machine code, and therefore costs less to develop a program.
      c) Early high-level languages: Eg: C/Fortran/Pascal. These are an order of magnitude faster to develop than assembly language, so for the same programmer salaries as assembly, your program has 10 times more functionality. But the user cost is the program can be 10% - 50% (or more) slower than the assembly version.
      c) Object-oriented languages: Eg: C++/Java/Python. These languages provide increased abstraction than C/Pascal. This allows programmers to deal with even larger amount of code, therefore develop even larger programs than C.

      What's special about Nim is, it's short and easy to read/write, just like Python. But Python programs run extremely slowly and therefore very few commercial programs are written in Python. While Python is dynamically typed, Nim is statically typed but uses type inference. By being statically typed, Nim is almost as fast as C. So now, you can implement your big C/C++ program in Nim in 1/2 or 1/3 the time it took to do it in C/C++, but the performance is almost the same as C/C++. And that means cheaper software, I hope.

      as a user, i care about cost/performance; curly braces, indents, static typing - totally irrelevant

      They're quite relevant, actually. Each of these technological improvements either reduce development time or allow for writing bigger programs. Since companies don't have an infinite budget for software development, better languages means your programs can have more features for the same amount of money spent in development.

    5. Re:real cost benefit new language by shoor · · Score: 1

      The cost of a new language is that programmers have to take time to learn it and develop an infrastructure for it, things such as software libraries to do math, communications, user interfaces, etc. Not every programmer will learn every language, and, in particular, learn every language well, which may be a handicap for employers as they have a smaller pool to hire their programming teams from in their chosen language.

      Companies have to spend time deciding which language to use, with a lot of people pitching this language over that one, and developing the languages will include a lot of duplication of effort.

      The benefit is that new languages may improve productivity, with emphasis on 'may'. There's a lot of controversy about how good some languages are that have been widely deployed for a long time. Ideally, there will be a shakeout and the best languages will win, but I'm not convinced that's the way things happen. More likely it's whichever language gets the best salesmen out there selling it, and, to paraphrase Mae West, 'goodness has nothing (or little) to do with it.'

      The earliest writing systems were complex and required years to learn. When easier to learn alphabets came along, the old scribal class would resist because it meant they couldn't command the high pay and respect they were used to. I suppose that might also exist to some extent with programmers and programming languages. It's hard to know who is being genuinely fair in judging languages.

      The holy grail for employers and people who just want to use their computer to get work done, as opposed to people who make a living writing code (and I was one of those people who made a living writing code for over 20 years), is to have an artificial intelligence program where you can just explain what you want to it in human language and it will generate an optimal block of binary code to do it (after clearing up any ambiguities in your human language specification).

      --
      In theory, theory and practice are the same; in practice they're different. (Yogi Berra & A. Einstein)
    6. Re:real cost benefit new language by Lunix+Nutcase · · Score: 1

      Seems you must be connected with this language somehow based on the amount of butthurt you seem to get by anyone criticizing it. You can proclaim things all you want with unfounded claims of Nim's greatness, but the rest of the world doesn't care and in 5 years when this language is still obscure and/or dead the rest of us can look back on your posts and laugh.

    7. Re:real cost benefit new language by Shados · · Score: 1

      New languages are useful when they introduce vastly different paradigms: not necessarily something new in itself, but something that they bring as a first class citizen of their ecosystem.

      Take Ruby vs Python. Different syntax (both are either a marvel of software engineering masturbation, or the worse thing since Global Warming, depending on who you ask), but aside for that, conceptually, they're very similar. They can be used as scripting language, they have dynamic features, they're fairly high level. Their ecosystem is also similar, from the way packages are maintained, to what they're used for.

      The primary differences as to why they're used, like python's math libraries (which have been facilitated by some of the language's particularities, but still), or Rails, could have happened anywhere. One of those 2 languages is largely redundant, but the category of languages they belong to, is not.

      C/C++/Objective C/Go/Whatever could also be bucketed together, but the category is useful: higher level languages that have native compilation as one of their core, and the ecosystem revolving around them reflects that.

      Java/C#/Scala as the languages with more sophisticated underlying runtimes/garbage collectors, etc.

      JavaScript on Node.js, while it may look a bit like Ruby because of the ecosystem, has interesting/useful performance characteristics, and is useful in itself because it allows one to use the same language they are semi-forced to use in web apps, everywhere else. There's value to that.

      The list goes on, but not much. You only really need 1 language per "category", and everything else is redundant, with a few outlier languages that bring some values on their own. Adding another yet another functional JVM language is useless. Making another loosely typed yet OOP scripting language with a package manager and built in REPL for web development would be fucking pointless. Another natively compiled language to compete with C++, when C++ 2014 has most of the modern features, would be another waste of time unless it does something REALLY different, because you then need to interop or rewrite all of the C++ ecosystem.

      The Ruby/Python/Node/Blah category seems to be the biggest offender by far. There's so many fucking variations at this point, its ridiculous. All of the JavaScript replacements with transpilers are also just syntax masturbation and bring nothing of value. AtScript vs TypeScript vs CoffeeScript...lol.

  71. Re:Such potential by Anonymous Coward · · Score: 0

    Fifty shades of C++

  72. Re:Such potential by slickwillie · · Score: 1

    C++, Rust, etc. Are there Fifty Shades of C++ yet?

  73. Re:I wonder if this is a kind of copyright protect by Karmashock · · Score: 1

    Calm down... what I'm wondering here is if in part the point is to use obscure languages. What if the issue is not some new feature of the language but rather the fact that no one really uses it? Maybe it is a job security thing? Maybe it is a way for a company under contract to keep a client using them? If I code a program for a company in some weird language and they contractually own the source code they're still going to be more inclined to contract with me again because they can't find another developer that can use that code.

    Are you worried about coming up with a good idea and then having your client contract with some cheap development house out of India or something? Code it in a language that no one else understands and they won't be able to do that.

    What is more, it is the sort of thing that some clients are going to miss. They might slyly note that they're not obligated to use you for patches and updates for the program going forward. The significance of coding it in a weird language might slip by them. And thus you or your company gains leverage going forward.

    Whether this is the primary reason people like these weird languages, you have to admit that you'd have more leverage to compel clients to use you in the future to maintain and add to those programs since it will be harder for them to replace you then if you used a more popular language.

    Outside of this issue, I'm actually having a hard time grasping why there is such a profusion of languages when most of them do the same thing. Yes, they've some advantages over each other but that is more a way of saying they're different from each other then saying they're actually better. Conditionally, pretty much anything can be better then anything else. I mean, a bathing suit is better for taking a dip in the pool then a heavy down coat... but if I were walking through the snow I'd rather have the coat. Neither one is really better then the other. They're just conditionally superior.

    --
    I've decided to stop wasting my time responding to AC trolls/sockpuppets... so if you want a response from me... login.
  74. Re:Such potential by itzly · · Score: 1

    You're going to argue that writing a couple of unnecessary braces is a better approach than relying on the indentation you're already supposed to be doing instead?

    Yes. Relying on indentation sucks. For instance, if you have a tool that combines user code with generated code, it is much easier for that tool to throw in some braces, than it is to generate the correct indention. Indentation also sucks if you combine code from different users (like a code snippet you find on-line). Indentation also sucks if you have a combination of tabs and spaces. I agree that's bad practice, but sometimes it happens, and you may not be aware of it.

  75. Re:Such potential by Grishnakh · · Score: 2

    In my own case, I have always used the K&R style, but my employer requires the Whitesmiths style. I have a large base of code at home that I wrote and maintain in the K&R style, and it's hard to switch back and forth between the two on a daily basis [sigh].

    Then don't. Use your preferred style at work, and then convert it to your employer's preferred style with "indent" before checking it in.

  76. Re:Such potential by Anonymous Coward · · Score: 0

    >Syntax is not fluff.

    Yes, because line numbers and nests of angled brackets in type declarations and such are far superior to moving away from a specific language's outdated syntax, rather than clinging to it because we're too old/lazy to learn a new one. A LOT of syntax is fluff, and is only necessary because the language in question was designed to require it.

    >It should give me, the developer, the choice - not take it away from me.

    Programmers are far too quick to use empty arguments like this in order to bolster their personal preferences about coding style. Removing the ability to screw things up is NOT a bad thing, especially in a language that isn't pretending to give you all the choice in the world to begin with (ie, a scripting language). Python may not have entirely succeeded in that goal, but I would much rather use a language that tries to standardize how people solve common problems then a language where simply moving from team to team in a company might result in me having to relearn how to program in that language.

    But does that mean I'm going to poo-poo those languages or try to pretend they're inferior? No, that's my personal preference. Those languages aren't trying to "help me screw up" any more than Python is taking away your choice. It's not like C lets you change which brackets do what, does it?

  77. Re:Such potential by Marginal+Coward · · Score: 2

    Exactly. Imagine a brand of beer whose primary selling point was that it came in a bottle so small that you could drink an entire bottle in one gulp. Although that might be a nice novelty, the beers that come in a larger bottle probably are more enjoyable overall.

  78. Nim appears friendly enough, just avoid IRC by caseih · · Score: 4, Insightful

    IRC is just a bad medium for mature discussion to begin with (but forums suck in many other ways, so where does that leave us). The IRC channel for most *any* project is unnecessarily toxic. Just because Araq is on the IRC channel doesn't mean the whole project is polluted by the ramblings of one or two fans/hecklers/wannabe devs.

    My view of Nim from the web pages presented in the summary, and the online docs is very different from your IRC-centric view. I've personally been very impressed with the quality of the documentation, tutorials, and papers I've read so far. I don't think I've seen as friendly and readable documentation for any project in a long time. Perhaps quality will drop as Nim becomes more popular and people concentrate on developing. But for a project that has seemingly come out of nowhere, this really impressed me. Not only is Araq apparently a decent programmer, he's also a good writer too.

    Thank you to the submitter for submitting this. I had never heard of Nim before today. Adding it to my short list of very interesting new languages to follow.

    1. Re:Nim appears friendly enough, just avoid IRC by Anonymous Coward · · Score: 0

      This Araq fellow does appear to use the IRC discussion when making language design decisions, though. Like the IRC transcript shows, in at least one case he has gone with a bad design decision just to stop arguing in the IRC channel, apparently!

      19:04:02 Araq ldlework: I intend to "fix" it because I'm tired of arguing ... not because it's a particularly good idea

      As an outsider, what I see is that the IRC discussion, which is very negative, is having a negative impact on the design of the language.

  79. Re:Such potential by jandersen · · Score: 1

    ...hammers don't need any training or lengthy experience to develop decent skills to use.

    Oh, but that's such an easy mistake to make; have a look at just how many kinds of hammers there are and think again. Yes, anybody can take a cheap hammer and knock in nail, although even that is not as simple to do well. To the untrained eye a hammer is just a lump of iron on a stick, perhaps, but using a simple tool requires much more skill than using a complicated, automatic gadget. Which is why amateur DIYers go and buy electric tools, where the professional will often buy simple, yet surprisingly expensive manual tools.

  80. Re:Such potential by Anonymous Coward · · Score: 0

    Never do this, in face, always also include the braces for the outer loop as well as indenting the inner loop. Unless you want people to hate you.

  81. Re:Such potential by makapuf · · Score: 2

    Of course python does allow block delimiters. Just remember to indent your code right.
    The delimiters are #{ and #} (should be put on their own line)

  82. Re:Such potential by Marginal+Coward · · Score: 2

    I've used "indent" many times in the past, and although it's better than nothing, it isn't really a solution for this problem. You have to go fix numerous other small style issues. For example, my employer has a very detailed - though quite eclectic - style. So, indentation and other issues that "indent" can deal with are only a small part of the problem. Also, K&R is my preferredstyle (I personally think Whitesmiths is dopey, but YMMV.) I'll concede my artistic integrity for pay at work, but not for free at home.

    Regardless, my primary point (and Guido's, in Python) is that braces lead to a variety of defensible styles. We all have our preferences, but there's really no way to determine which is "best".

    Also, for the record, I should mention that Python allows indentation to be any consistent level, with hard tabs counting as 8 spaces. Though it's seemingly contary to the aforementioned principle, that one can be filed under "practicality beats purity."

    Tim Peters once said explained such contradictions with something like "the key to any successful philosophy is to allow yourself enough wiggle room to do what you really wanted to do in the first place." [wink]

  83. Re:Such potential by ThePhilips · · Score: 1, Insightful

    Wow.

    Removing the ability to screw things up is NOT a bad thing

    Can you please elaborate how use of whitespaces for defining control flow is "removing the ability to screw things up"?

    If nothing else, use of the invisible characters for something as important as control flow is actively helping "the ability to screw things up".

    But does that mean I'm going to poo-poo those languages or try to pretend they're inferior?

    The problem is, Python is inferior. Because it provides less tools to its developers.

    It's not like C lets you change which brackets do what, does it?

    But C does have at least some brackets.

    It does have clear visual clues and delimiters in its syntax.

    --
    All hope abandon ye who enter here.
  84. Re:Such potential by tibit · · Score: 1

    echo 'int main(){printf("hello\n");}'|gcc -xc -&&./a.out

    Nope, you don't need the spaces.

    --
    A successful API design takes a mixture of software design and pedagogy.
  85. perhaps something for the python dumbasses by Anonymous Coward · · Score: 0

    but nothing for the main market

  86. Re:Such potential by tibit · · Score: 1

    If your blog "engine" can't handle a simple pre-formatted code block without tabs, you're doing things wrong. A lot of blogging tools out there seem destined for the barely literate, where a few paragraphs of text and a few pictures is the pinnacle of expressiveness. It's too bad that those tools mess up Python, but they mess up C/C++ and everything else equally badly: it becomes an unreadable mess.

    Given that a space cannot be re-configured to mean something else, as opposed to tabs, I simply stopped using tabs for indentation long ago. Any decent editor knows how to deal with indentation without a 1:1 mapping between the Tab key and the TAB ASCII control code. So, I really don't see a problem.

    --
    A successful API design takes a mixture of software design and pedagogy.
  87. Good analogy -- music and programming by pem · · Score: 1
    I like your analogy.

    I've seen people buy the 'best' musical instruments thinking it will help them play better, it doesn't. Know what does? Practice,experience,time...

    I play an instrument. I now play a lot better, because I practice a lot more, because the instrument I bought two years ago is a joy to play and listen to compared to the one I had before.

    Different people prefer different instruments, just as different people prefer different languages. Your plea to stop creating/using new ones sounds suspiciously like the argument that everything has already been invented.

  88. Input Output by Anonymous Coward · · Score: 0

    Computer languages must evolve or we'll never get holodecks (and I guess future programming languages will rely on an artificial intelligence that does most of the leg work for you and you just customize upon assumptions made from your descriptions)

    But there does seem to be rather a lot nowadays. There's some time saving features in some, others are structured to minimize bugs and all that.

    Isn't all that matters the program that's produced? What's Nim or Rust or any of these new languages going to save you? 5% of your time?

    That's great for business, assuming you save more money than it costs you to switch within a time-frame that doesn't damage the future of the business.

    But until new languages have truly evolved past minor improvements and syntactic sugar (at least cutting development time in half without sacrificing one bit of functionality) isn't your time best spent on perfecting the use of an existing language? developing and improving the software you intend to create?

    I've been developing a game engine using Object Pascal (FPC) for many years (the latest versions of the language blow all over Nim by the way and does what Nim is trying to do already)

    I'd of had a far easier time re-writing in C++ so I could make use of existing libraries. I'd of had an easier time (but sacrificing performance) had I re-written in a garbage collecting language.

    But had I done that, I'd now be working on a quarter of an engine rather than a full one and the end result would be no better.

    If everybody switched over to new languages the moment they came out, we'd all still be in serial consoles battling 90's security bugs.

    If nobody switched to new languages we'd probably have the EMH by now.

    Languages must evolve but unless it's a game changing advancement (like object orientation over functional etc) these new languages only serve to split skill sets and hold back progress.

    1. Re:Input Output by Anonymous Coward · · Score: 0

      "If everybody switched over to new languages the moment they came out, we'd all still be in serial consoles battling 90's security bugs."

      You've just described the Linsux Open Sores Communuhtay, LMFAO!

  89. Language butterflies by OrangeTide · · Score: 1

    I guess I don't get it, there are some people that seem to flutter from one language to the next. Sure, it's neat that so many people are experimenting with new ideas, but I'm not really willing to build a big project around a new language that has no standardization nor offers any radically different programming methodology than the current languages I use. I view languages like Python, Rust, Ruby, Lua, etc as good platforms to write throw away programs.
    Python has proven to me several times that it is willing to break old programs with new releases of its environment, which is good on them because they shouldn't stagnate but I also don't want to write anything big in it that has to be ported every 18 months either. Pretty much all of these new languages, which are still maturing, are like this. Java being the big exception of a language that quickly stabilized, likely due to the heavy corporate backing and the original intentions for the environment to be both feature packed and cross platform.

    --
    “Common sense is not so common.” — Voltaire
    1. Re:Language butterflies by phibermon · · Score: 1

      Totally man. It's the end result that matters. 5% shaved off my development time with some minor 'improvements' of some new language isn't worth spending years re-writing my code-base and half the libraries that don't yet exist in that language. And even if I did re-write, by the time I'd finished some new language would be slightly 'better' and so on and so forth. Language becomes totally unimportant when your project is large enough. You're no longer programming in that language, it's just the buttons you press to control the language that is your functionality. Calls such as Engine.Initalize, ResourceMan.Load() are so far above the language itself that the language becomes irrelevant.

    2. Re:Language butterflies by gnupun · · Score: 1

      It's the end result that matters. 5% shaved off my development time with some minor 'improvements' of some new language isn't worth spending years re-writing my code-base and half the libraries that don't yet exist in that language.

      You seem rather ignorant, because we are not talking about 5%, it's more like 50% to 70% reduction in time spent.

      Say you or your company wants to develop a big, in-house program for something important. You can choose C/C++ so that the program will run fast. But it's going to take long time to develop, a long time debug and longer time to maintain that stuff. That's great for programmers, but not for the company paying for those programmers.

      Suppose the company decides to switch to Python to reduce development time by 1/2. But now the program runs quite 5x slowly than C++, which is also unacceptable.

      Enter Nim. The development time of Nim is still half of C/C++, but the speed drop is only 5% less than C++. Nim is clearly a winner because it's as fast as Python in reducing development time while almost as fast as C/C++ during execution. It's like having your cake and eating it too.

    3. Re:Language butterflies by Lunix+Nutcase · · Score: 1

      You seem rather ignorant, because we are not talking about 5%, it's more like 50% to 70% reduction in time spent.

      And from where are you getting this 50-70% reduction? Would love to read the peer-reviewed study.

      Say you or your company wants to develop a big, in-house program for something important. You can choose C/C++ so that the program will run fast. But it's going to take long time to develop, a long time debug and longer time to maintain that stuff. That's great for programmers, but not for the company paying for those programmers.

      Maybe if you have a bunch of people unfamiliar with the languages. I work at a company where we write lots of big programs in C++ and what you say isn't really true.

      Enter Nim. The development time of Nim is still half of C/C++, but the speed drop is only 5% less than C++. Nim is clearly a winner because it's as fast as Python in reducing development time while almost as fast as C/C++ during execution. It's like having your cake and eating it too.

      Again, where is your evidence that development time is halved by using Nim? Your word alone is not evidence And is this before or after you factor in all of the retraining, library rewriting, etc? Because I'm betting even if your claimed "50-70%" where correct (which I doubt) you probably wasted more time and effort spinning up on some obscure language.

    4. Re:Language butterflies by phibermon · · Score: 1

      Summing up another comment I made on this post, it seems very difficult to quantify the (developmental) efficiency gains of one language over another without long term use in a business/team environment. 5% was of course a guess but I strongly feel that any gains are closer to my estimate than to the estimate of 50% to 70% reduction in time. (and no I'm not 'rather ignorant' can we please keep things civil? you wouldn't speak to a client like that) Is anybody aware of any methodologies to quantify such things? So many factors, error rates due to syntax possibilities/restrictions, learning curves, the libraries available for development. For such a new language I seriously doubt that anybody can give an accurate estimate. But such a large margin? I doubt it's much more than 10% for a strongly typed object orientated language (such as newer Object Pascal dialects) over older functional languages (like C)

  90. Re:Such potential by Anonymous Coward · · Score: 0

    > I personally do not like Python for that reason. I prefer to have a visual marker that block is closed. You know, like a dot at the end of the sentence.

    Or the "over" in two-way communication. I strongly despise terminators, but they are necessary at times. Nevertheless, one gets tired of the constant "over" this, "over"that... curly brackets are not so bad compared to "begin"/"end", but it annoys me they are hard to align: either they go on separate lines by themselves or we must make an exception on the first line (and last), using spaces instead of tabs to account for one position taken by the curly bracket.

    That alone justifies the creation of a special editor which takes care of that. But then someone realizes visual indentation is enough to convey code structure. That's where Python shines. Of course, some people need the punctuation (or the "over" marker as I see it).

    Once, before I knew Python, I have seen some folding editor which fold 2D text blocks, allowing a kind of color delimiting of a single block (otherwise delimited by e.g. curly brackets).

    Normal punctuation is actually OK, because it conveys something which can't be read otherwise -- like pause indicated by a comma; or the enumeration described with a semicolon.

    In code properly indented it's redundant, though. And for being redundant it becomes annoying. Things are not simple as they should/can be. Wanna use curly brackets? Then don't indent.

    Wanna make one-liners? Why? To save space? To have less Lines of Code? How many characters make one line up? I'd like to have 50 characters lines, for easier reading... there goes the one-liner down the drain.

    If one disregards correct indentation to format code, say, like concrete poetry, all immediately visible structure is lost, a collapsing (folding) module editor becomes less comprehensible. Unless one really wants obfuscation, I wonder what tortuous thought process might want not to see logic structure.

  91. Re:Such potential by Anonymous Coward · · Score: 0

    I'm still only hearing "I think this, therefore it's true". You've clearly never dealt with substantial codebases in Python and a brace-delimited language, or you would realize that Python DOES actually encourage better and more standardized coding. But I know it's futile to actually try to convince you of anything, because you've made your choice.

    You're not even able to see anymore that forcing brackets is like forcing whitespace - you're just used to its problems and don't want to care about them as much - like having pointlessly variable (and often very poorly) formatted code, instead of the issues with whitespace-delimited code.

    Next you'll probably just tell me to use a linter (as if it makes a difference when and how you lint your code) or that some people have a tougher time reading whitespace-delimited code, therefore it's inferior (as though people with other disorders don't exist who prefer white-delimited code).

  92. Re:Such potential by Anonymous Coward · · Score: 0

    > Indentation also sucks if you have a combination of tabs and spaces. I agree that's bad practice, but sometimes it happens, and you may not be aware of it.

    Get a better editor. 'Tab' is short for 'tabulate', ie make into a table. Source code is not a table (except RPG) and there should be no tab characters. The editor should convert the tab key into the correct number of space characters. It should also highlight tab characters in existing files, with colour for preference.

  93. Re:Such potential by Anne+Thwacks · · Score: 0
    But the Gnu Prurient Loonies insist: taking away your choices is good for you! We know better than you cos we are the 1337!

    Join the illiterati before its too late!

    --
    Sent from my ASR33 using ASCII
  94. Re:Such potential by Anonymous Coward · · Score: 0

    Managers have more people since they now have an offshore database centre of excellence. Clueful developers end up doing more work.

  95. Re:Such potential by Anne+Thwacks · · Score: 1
    what's the point of having a dba simply copypasting the queries you write?

    Cos debugging already tested code is an expensive waste of time.

    --
    Sent from my ASR33 using ASCII
  96. Re:Such potential by Anonymous Coward · · Score: 0

    Types matter -- pretending they don't will not change the fact that they actually do matter. Are you telling me that a Python function defined as:

          def foo(a, b,c)
            """ Returns an int
                      a is an int, b is a char, a c is a float"""

    Will somehow be magically valid if the caller expects a List, and is passing String/Float/Dictionary for a/b/c ? Why in the name of all things "Best Practices" would you NOT want to define the types of the parameters function declarations?

    I've been programming for well over 20 years, and it has always been the exception (not the rule) where you'd use a void* or Object or 'def' instead of specifying the type.

  97. Re:I wonder if this is a kind of copyright protect by phibermon · · Score: 1

    I like the way you think! lets go into business together, you write in BrainF*** and I'll kidnap their dog!

  98. Re:Such potential by wiredlogic · · Score: 1

    As opposed to the situations where block structured code gets its indentation garbled and you can't tell which block a "}" or "end" is associated with.

    --
    I am becoming gerund, destroyer of verbs.
  99. Re:Such potential by Anonymous Coward · · Score: 0

    You don't need braces but some sort of block delimiter is really the only way to go. For example Lua and Ruby don't use curly braces, just "end" at the end of a block and this is fine.

    I know Python but only use it what I absolutely have to solely because of the significance of white space in a programming language (WTF?).

  100. Re: Such potential by Anonymous Coward · · Score: 0

    For a really fun time: use both Spaces and Tabs in your indention characters.

    Python pisses me off like makefiles did -- white space should NOT affect the semantic meaning.

  101. Re: Such potential by Anonymous Coward · · Score: 0

    Or, whitespace should not matter like it doesn't matter in the vast majority of programming languages.

  102. Or you could just use Ruby by MSJos · · Score: 1

    which already has that.

    Ruby is Python's less constrained cousin.

  103. Re: Such potential by Anonymous Coward · · Score: 0

    The supposed advantages Python gives to readability (forced whitespace), is FAR outweighed by the uncountable man-years of losses since Python doesn't allow the coder to specify input & return Types.

  104. Re:Such potential by reanjr · · Score: 1

    Python's approach is to force you to indent to avoid writing the horrible code you just wrote.

  105. Agree by MSJos · · Score: 3, Insightful

    It limits expressiveness for no reason other than dogma.

  106. Re:Such potential by fahrbot-bot · · Score: 2

    I like the language. almost all of it. BUT, the lack of curly braces was a huge mistake. indentation is fine. we all agree its needed.

    In addition, according to the Language Manual, Nim supports the directive "#! strongSpaces" to allow white space to affect operator precedence. An example from the manual:

    #! strongSpaces
    if foo+4 * 4 == 8 and b&c | 9 ++
    bar:
    echo ""
    # is parsed as
    if ((foo+4)*4 == 8) and (((b&c) | 9) ++ bar): echo ""

    So with/without the directive:

    • with: ((foo+4)*4 == 8)
    • w/o: foo+((4 * 4) == 8)
    --
    It must have been something you assimilated. . . .
  107. Re:I wonder if this is a kind of copyright protect by Karmashock · · Score: 1

    How many companies deal in proprietary widgets that force you to buy their licensed products or the thing doesn't work.

    If the big corporations can think that way then why can't the small development houses or independent contractors?

    And where does the big company tell you that "you can only use our licensed products" in their advertising? No where. You ask the salesperson and they'll say "well, we just want to make sure you get the highest quality so we ensure only our validated products are used."

    Ever used an ink jet printer or any product from apple? Why would they be the only people trying that tactic.

    And the problem with kidnapping someone's dog is that is illegal. Writing in brainf** however is completely legal. Which means if someone writes in brainf** they're not a criminal. And you if you kidnap their dog then you are a criminal.

    It helps if your business practices don't break the law. And its even more advantageous when you can find out ways to violate the spirit of a law without actually breaking a law. Ask the investment banking world about that. They're geniuses at finding new ways to do everything they're not supposed to do by doing it a slightly different way. And the smart ones walk away with lots of money not because they did a good thing or came up with a good service but found a new way to break the law without going to jail.

    And why would they be the only ones to think that way?

    Explain why you'd code in a non-standard language for marginal gains? There are huge advantages in using a standardized language. Use some weird language that five people know how to code in and you're FUCKED if you have a falling out or the weasels decide to start raking you over the coals. What are you going to do? Code the whole thing from scratch?

    The IRS still has programs written in COBOL that they've been using since LBJ. I know of many major companies that still use DOS databases and various dos programs that were custom made for them practically a generation ago.

    What do you think happens when they go searching for someone to patch one of these dinosaurs? They quickly realize that its cheaper to pay a programmer that knows the code to patch the existing code then it is to hire someone to write the whole thing from scratch in a new language.

    Which is how programs stay in effect from LBJ to today. That's just legacy code. But you can get the same effect instantly by just using an odd language now. Bingo... customer for life. You can't be too greedy about it. But you have some additional job security. It is very unlikely that someone is going to walk in off the street or cold call them and have the resources on hand to fix their problem. They'll have to engage in a long search and who knows how effective that will be. Or they can just work with the person they know... just easier.

    Instantly no competition.

    --
    I've decided to stop wasting my time responding to AC trolls/sockpuppets... so if you want a response from me... login.
  108. The one true coding standard by MSJos · · Score: 1

    Is the altar on which mediocre programmers worship.

    Managers love it because it makes people easily replaceable, like cogs in a machine.

    Python programmers make for good cogs.

    1. Re: The one true coding standard by orlanz · · Score: 1

      In large dev teams, your actual coders and testers better be cogs in a machine. Coding is a commodity service. If they aren't, you are risking too much on too few people. The value is in design and execution. Purely writing out a solution is no longer a unique skill set.

  109. Re:Such potential by fahrbot-bot · · Score: 1

    Your examples are not convincing. Clueless posters will always mess things up, including omitting necessary braces. Python makes this neither worse nor better.

    Yes, but it's quite possible that the code won't parse correctly w/o the braces (or with extra braces), where improperly indented Python probably will, and just execute incorrectly. I'd rather have a parse/compile error than run-time error or, more likely, improper execution with no error. Sure, examples can be made either way, but missing/extra braces *can* be detected by the parser. Missing/extra white-space, not so much.

    Regardless of whether one (dis)likes white-space delimited blocking, it's main driving force is the ego of the language developer who has declared it "more elegant" than braces, even though the syntax offers absolutely no enhanced benefit.

    --
    It must have been something you assimilated. . . .
  110. Re:Such potential by 31eq · · Score: 1

    Types certainly matter, and Python has types. Yes, feeding the wrong type into a function probably won't work. It'll raise an exception and you'll see a traceback that helps you to fix your code.

    If you want to check the types that are supplied to a function, you can do it with assertions. You can even go further and check the things going in have the properties you want. Type checks are a crude form of precondition. A function that expects a tuple will probably work with a list. A function that works with an iterable can accept a whole load of types without all the constipation of an explicitly coded interface to declare for all of them.

    If you want the type errors picked up before you execute the code, you might be in luck. You could use the assertions, although I don't know of any tools that do this. There's also a convention for type specifications in docstrings. And official support for function annotations:

    https://www.python.org/dev/pep...

    None of which addresses static typing as such, which says that after assigning an integer to a variable, you shouldn't be able to reassign it as a float.

    There are, still, real advantages to static typing and languages that give you those benefits with type inference, so you don't have to put type declarations all over the place. There are also languages with better generics than void * in C or Object in Java. (C++ and Java are even two of them). Mixing the good features of Python with a good static typing system would certainly be a good thing.

    Oh, and I've been programming for a good deal longer than 20 years. I can appreciate different languages for working in different ways.

  111. Re:Such potential by fahrbot-bot · · Score: 1

    Python folks will mostly gravitate to reactor451's version. Are there other versions? Yes, especially when you add in iterators and generators, but for even those, developers will gravitate to ONE version of it totally dependent on if they use that feature in their coding.

    Code correctness that relies on how far one has "gravitated" in their coding style and/or whether people agree on and/or adhere to those styles is the issue. All your brace-delimited examples work the same. White-space delimited variations won't.

    --
    It must have been something you assimilated. . . .
  112. Re:Such potential by jythie · · Score: 1

    Nicer? When I look at that, my first assumption is that there were additional lines after the y loop that somehow got erased. If I was reviewing this code, I would tell the developer to fix the indentation before checking it in, regardless of language.

  113. Re:Such potential by Anonymous Coward · · Score: 0

    > It is appears to be sort of a religious issue for the language creator and some of his followers.

    Whereas your diatribe appears to be a religious issue with a different god. If you don't like Python then just don't use it, nobody cares, no one is trying to force it on you. No one is going to rip your braces from you.

  114. Re: Such potential by Anonymous Coward · · Score: 0

    Here is a positive: if you recall the AT&T bug of the 90's that affected a million+ customers, the bug ocurred because the indentation levels of some "if" statements lied. That is, the indentation level made the code appear it flowed in one path, but the actual syntax parsed to make control flow in the other path.

    If the software had an automatic means of preventing the code from compiling if the indentation didn't match the meaning, the bug could have been avoided. Python actually *does* have that feature.

  115. Re: Such potential by Anonymous Coward · · Score: 0

    What utility is there that tells me what the types are for this function:

    def foo(a,b,c)

    if the author of that function does not support any (AND all) types for input parameters a, b & c -- then the language has a serious design flaw. How is a function author even to indicate what the valid types are?

    I have no issue with python as a scripting language -- using it for long running server processes on long lived projects (with high turnover) is where I take issue.

  116. Re:I wonder if this is a kind of copyright protect by phibermon · · Score: 1

    I agree with you, it was a joke, not sarcasm. It's a common tactic although with old systems in banks and government institutions it's often more about avoiding downtime than nefarious plots by developers. Such things definitely do happen though, I know for a fact my previous employers do it all the time. I'm the one that suggested it. Yes it's immoral, no we didn't care - I've got mouths to feed and they've got sports cars to buy.

  117. Re:Such potential by Anonymous Coward · · Score: 0

    > it should have been optional. require indentation, fine. but also ALLOW those of us who like seeing an 'open and close' semantic who is explicit (not just implied) would have been the right thing to do.

    Feel free to scatter your Python code with appropriate #begin #end lines to suit you needs.

    if ( something ): #begin
            do stuff
    #end

    or whatever style you prefer.

    The whole point of Python is that, for the most part, there is only one way of doing something. That makes it more understandable to all those who do it that one way. If you prefer begins and ends or braces in a multitude of variations then use a different language.

    > a lot of us will breathe a sigh of relief.

    Please erase all Python programs, libraries and documents from your computer and then the rest of us will breathe a sigh of relief.

  118. Re:Such potential by ThePhilips · · Score: 1

    Oh this is just a load of.

    On C/C++/Java code you can always run an formatter, and reformat it to your reading pleasure.

    Ever wondered why there is no such tools for Python?

    And I have seen enough of the crappy Python code too. It looks different from the C-like languages, but the shitty OOP is a shitty OOP in any OO language.

    Different syntax is not a solution to any problem.

    --
    All hope abandon ye who enter here.
  119. Re:Such potential by KalvinB · · Score: 1

    All the Python I've seen used an escape character rather than the """ which is a pretty silly way of doing it. But at least it can be done.

    C# uses @"

    But no, it won't change my mind because forced indentation is a non-starter. It's just an aggravation that doesn't add anything.

  120. Re:Such potential by Anonymous Coward · · Score: 0

    > I prefer to have a visual marker that block is closed. You know, like a dot at the end of the sentence

    Then stick with COBOL.

  121. Re:Such potential by Anonymous Coward · · Score: 0

    Wow, you must be a treasure to work with (or even live with). Yes, preference and insight equals "bizarre obsession". :-P

  122. Re:Such potential by Anonymous Coward · · Score: 0

    > Indentation gets goofed up all the time.

    I have programmed extensively in Python for more than a decade and never have indentation 'goofed up'. Perhaps you need a better text editor.

  123. Re:Such potential by blue+trane · · Score: 1

    Python's like a beer that only fits in one bottle size.

  124. Re:I wonder if this is a kind of copyright protect by Karmashock · · Score: 1

    first, poe's law. ;)

    beyond that, I'm well aware of it and I don't especially blame you. Customers that hire developers to do special contracts are frequently two faced in negotiations. The developer will bend over backwards to get the contract and then after they've given away the best bits as an inducement the client will change their mind and go with someone else... taking your contribution with them. Writing a contract that will stop them from doing that and worse getting them to sign such a thing is very hard. Easier to exploit their ignorance to hold them to a provision of the contract they didn't even know was there.

    People can say what they like about that, but I feel it is reasonable so long as you're not greedy about it. As they say "you can be a pig but you can't be a hog." You take enough that you can run your business without going into the poor house and as much as possible try to make sure they don't notice what you've done or why you did it.

    One of the things great about this practice is that it is deniable. It isn't obvious why you did it.

    --
    I've decided to stop wasting my time responding to AC trolls/sockpuppets... so if you want a response from me... login.
  125. Re:I wonder if this is a kind of copyright protect by iluvcapra · · Score: 1

    Wel, by definition, if something is copyrighted it's "released," you have to publish something in order to obtain a copyright.

    Maybe everybody having their own idiosyncratic language isn't a copyright thing, but it's a pretty standard business tactic for vendors, for everyone from IBM to Apple. IBM or Control Data were happy to give you source code with their distribution, because they were pretty satisfied that you'd never be able to run the code on anything but their gear.

    Nowadays shops like Microsoft or Google just create incompatible extensions to Java to keep people targeting their runtime infrastructure. Or Apple just up and creates a Rust clone (an arguably much improved one, but still pretty redolent of the original).

    --
    Don't blame me, I voted for Baltar.
  126. Well by Anonymous Coward · · Score: 0

    Araq SHOULD have named it YASLDJ: Yet Another Shit Language Du Jour.

  127. Re:Such potential by cjameshuff · · Score: 1

    Except that never actually happens, because there's always enough information there to determine the meaning of the code. The process of restoring sensible indentation can even be automated.

  128. Re:Such potential by gweihir · · Score: 1

    If you have programmed for 20 years and are unaware of how the type system of Python works or do not understand its advantages, then you have been asleep at the wheel for 20 years. Really, have a look at the respective literature before you comment on thing you are obviously absolutely clueless about.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  129. Re:Such potential by Anonymous Coward · · Score: 0

    > But the Gnu Prurient Loonies insist: taking away your choices is good for you!

    I am not sure what choices have been removed from you. You can still use C or COBOL or Pascal or whatever other choice you want.

    It seems to me that it is you trying to remove other programmers' choice of working with Pythonic code.

  130. Re: Such potential by cjameshuff · · Score: 3, Insightful

    In Python, that could easily have been one or more statements that were unintentionally made conditional or removed from the conditional, perhaps while adjusting the indentation of adjacent just-moved code so the interpreter would put it in the right block. Python's indentation significance doesn't improve things one bit. If you want a fix for this problem, make the end delimiter non-optional, which would make it much more difficult to accidentally put a statement in the wrong block.

    And of course, the presence of delimiters does nothing to prevent a language from requiring indentation or producing warnings when it finds inconsistencies between indentation and delimiters.

  131. Re:Such potential by gweihir · · Score: 1

    The bottom line is that both static and dynamic typing both have significant advantages and their place. There was some mass-confusion maybe 15 years ago, where many people thought static typing and static type-safety was the only way to go, but fortunately saner minds prevailed.

    That there are obviously people that after "20 years of programming" have not moved beyond the level of beginners where type systems are concerned just shows that there are a lot of really, really incompetent "programmers" out there. Even a little experience with functional or logic programming languages with dynamic typing demonstrate the advantages very clearly. Modern scripting languages like Python or Ruby use concepts from functional, imperative and OO languages to great advantage. They do require a certain level of skill and insight though.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  132. This language gets popular... by Anonymous Coward · · Score: 0

    At some point there will be a book released titled "Secrets of Nim" and who ever makes it will get sued into oblivion.

  133. Re: Such potential by gweihir · · Score: 1

    Stop using big words you do not understand. There is far, far more to type systems than your broken and narrow view.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  134. Re:Such potential by Anonymous Coward · · Score: 0

    In Python, a string that starts with "'" must be ended with the same "'". You can also start with '"' and it must end with '"'. Or any three-character combination of single or double quotes.

    Captcha is 'educator'

  135. Toxic eh? In IRC That's just par for the course by Anonymous Coward · · Score: 0

    If you can't stand it, you must be new

  136. Re:Such potential by gweihir · · Score: 1

    I disagree on both points. First, directly posting compilable code is always difficult, that is why you attach it as ASCII. And second, after having done real work in Python, I find the brace-less style easier to read, easier to write and clearer because it is more compact. (And while we are at it, I have done real work in > 20 different languages of various language types, so I have a bit of an intuition whether one is harder to use or not...)

    That you do not like it is not the fault of the Python creator. Simply do not use it, but absolute statements about it being "wrong" or "false" or "offers absolutely no enhanced benefit" just demonstrates a problem on your side, not on the side of what you criticize.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  137. Nim's community is very toxic. by Anonymous Coward · · Score: 0

    I intend to "fix" it because I'm tired of arguing ... not because it's a particularly good idea

    Sounds like responsiveness, if araq had an easily expressed reason not to have it, he would have continued arguing.

  138. Looks like by bytesex · · Score: 2

    Looks like a readable python variant.

    --
    Religion is what happens when nature strikes and groupthink goes wrong.
  139. Ruby by Anonymous Coward · · Score: 0

    Looks like Ruby, just uglier

  140. [1]=overhead? Not always by fyngyrz · · Score: 1

    The overhead of offsetting by one so that the computer can find what you're actually looking for is something you pay for on every single array access.

    While I am no fan of "index by 1", I think it's only fair to point out that the above is not true with a compiled language.

    --
    I've fallen off your lawn, and I can't get up.
    1. Re:[1]=overhead? Not always by brantondaveperson · · Score: 1

      It is if both the array and the index arrive as variables - so that the compiler doesn't know what they're going to be. In that case you do have an extra instruction to perform.

    2. Re:[1]=overhead? Not always by fyngyrz · · Score: 1

      I don't see it. The compiler always knows what it is doing. You pass a variable length array, at some point, you're going to have to say how long it is. The compiler has to index into it, but if the language says that all arrays are indexed by 1...n then there's no difference in how such an array is treated as compared to one that is defined statically in the source code, or in how the compiler makes dynamic access to an array work.

      The most efficient (codewise) way to write such a system is to allocate every array as +1 and ignore [0] (or use it for something else, like storing the length.) That way there's no need to do any funny math at all. 1 x element_length is the effective zeroth element in the array. Works fine.

      Am I wrong?

      --
      I've fallen off your lawn, and I can't get up.
    3. Re:[1]=overhead? Not always by brantondaveperson · · Score: 1

      Oh ok, I see what you mean. Yes, you could use the zeroth element to store the length, but now you're presumably going to do bounds checking on every access (or what's the length for?), which is even more expensive. Also, storing the length at element zero is problematic if the array is large and the width of the array elements are too narrow to represent it.

      Or you could just waste the space, which seems to be a pretty weird approach.

      I don't know - it does seem to me that 1-based array indexing is just ever so slightly more difficult and ever so slightly less efficient and far far less common. So, why?

    4. Re:[1]=overhead? Not always by stoborrobots · · Score: 1

      (or what's the length for?)

      Bounds checking is one option, but it could also be used for iteration.

    5. Re: [1]=overhead? Not always by Anonymous Coward · · Score: 0

      Uhh... what?

    6. Re: [1]=overhead? Not always by stoborrobots · · Score: 1

      If you're storing the length, then "iterate over array and perform this operation" (for example, for a search or a "double every element" transformation) can use the known length to set up a for loop, rather than having to check "am I at the last element of the array" for every element... This could be a good reason to store the length even if you don't want the cost of bounds-checking.

  141. Re:Such potential by Anonymous Coward · · Score: 0

    By the way, what is python's way of handling grouped statements like these

    Generator expressions or itertools:
    for y,x in ((y,x) for y in range(height) for x in range(width)):
            # your code here

    from itertools import product
    for y,x in product(range(height), range(width)):
            # your code here

  142. Wading (indenting) in: by fyngyrz · · Score: 1

    For Python, you interrupt your train of thought for ten minutes while you debug the whitespace.

    Never happens to me, and I write a lot of Python (though, on-topic, Nim looks fascinating.)

    Of course, the reason it never happens to me is that my editor of choice displays tabs as (dimly, colored) visible entitles, thusly:

    <-->

    That's for a four-column tab, which is what I always use.

    I would *like* it if my editor showed an indent level as a vertical bar, with a number prepended to the left indicating the indent level -- 1, 2... n -- I think that'd be very nice for when you page over lots of code. (Maybe I should hack on my editor... hmmm)

    I'm a happy user of c, and perfectly comfortable with curly braces (I even wrote a magazine article on c bracing style way back when) but frankly, Python's way is better. Less to type, less to look at, faster to code, perfectly clear as to what's going on at all times. Presuming you use an editor that makes indentation visible. And why would you not?

    --
    I've fallen off your lawn, and I can't get up.
    1. Re:Wading (indenting) in: by brantondaveperson · · Score: 1

      That's great that you always have access to your editor-of-choice.

      Sometimes one has to use whatever command-line editor happens to be lying around, nano or vi or whatever. Sometimes (yes.. I know...) you might be on Windows trying to use notepad. Notepad++ isn't much better in this respect.

      The problem with python is that your code can look fine in any of these editors, but not actually be fine. If I can't find simple syntax errors in code just by looking at it, then there is a problem with the language.

      Also, it's not less to type in a syntax-aware editor (in a non-syntax aware editor, python is much worse).

      In C: it's "{ \n <code> }" to type a new block
      In Python it's ": \n <code> \b" to type a new block.

  143. Re:Such potential by Anonymous Coward · · Score: 0

    If I "cluelessly" copy/paste some C into a blog and post it, the curly braces are not going to magically disappear. Indentation may magically disappear. That's the difference TheGratefulNet was pointing out.

  144. 'accident', LOL by fyngyrz · · Score: 1

    The start or end of a block does not accidentally occur, where as this can happen all the time in python.

    No. That's not an "accident"; that's a coding error. It doesn't mean the language is lacking; it means your coding skills are lacking.

    Do it right, and you won't have problems. If you think doing it wrong is the fault of the language, then you are very sadly mistaken.

    --
    I've fallen off your lawn, and I can't get up.
    1. Re:'accident', LOL by TapeCutter · · Score: 1

      it means your coding skills are lacking.

      Wow, my hubris meter just exploded.

      --
      And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
  145. Re:Such potential by Anonymous Coward · · Score: 0

    Bull, dynamic typing is the tool to help beginners that have no idea what they are working with. A good language allows the mixture of BOTH. Mainly because statically typed variable are insanely faster and easier to optimize allowing the executing code to bypass type checking. Static typing also allows library writers to force people using it, to pass in correct data (i.e. telling a function that a parameter is coming in as an integer, allows it to fail at compilation time when a string is passed in, rather than wait until the function is actually execute during run time)

  146. Re:Such potential by Anonymous Coward · · Score: 0

    Python allows arbitrary indention within bracket expressions, and you can start an inline bracket expression everywhere an expression is allowed. The only limitation is that statments and blocks must follow the intenditon, the following code is fine:


    def f():
            matrix = Matrix(
                1.0, 1.0, 1.0,
                1.0, 1.0, 1.0,
                1.0, 1.0, 1.0
                )

            two = (
                  1 +
                  1
                )

            # there is no need to indent to the block level either:
            myList = [
    listItem1,
    listItem2,
    listItem3
    ];

  147. Such nonsense by fyngyrz · · Score: 1

    No. It limits expressiveness so that we can all read each other's code without having to refactor the whole bloody mess. It does what c coding standards within an organization do, only it does it for everyone who writes in the language. Which is bloody awesome.

    And it does so in an extremely efficient way, coding--character-wise.

    Would you like reading c code where the style used was totally random? One line, the braces are all there, next block looks like K&R, next block looks wide open, next block some other way... of course not. That's bloody chaos. Well, just as it is an advantage to keep to one consistent style for you, for an organization -- so it is if *everyone* keeps to the same style. Less chaos; more and better comprehension.

    Every objection to Python's whitespace mechanism I have ever heard boils down to one or both of two things: Get a better editor, and/or learn to program instead of pretending the language should have been designed to help you cope with your inability to adapt.

    The very fact that someone -- anyone, never mind the legions of someones in this case -- can code very well with Python, and you can't, tells you only one thing: Your skills are inferior to theirs. Any protestations otherwise are simply one form or another of making excuses for limitations you refuse to address.

    Also: One of the primary skills of any good programmer is to take the advantages of any language they are working in and leverage them to make things easier, better, faster, more efficient. If you can't do that, then you are (considerably) more limited than someone who can. In the case of consistent indentation, the advantages are quite obvious; your job as a programmer is to recognize them, grab them by the neck, and make them your love slaves. Not whine about it.

    For instance, much as I despise perl's use of weird characters to mean things, I bloody well use them to my advantage anyway. Because when I write in perl, the language is my bitch. Not the other way around.

    --
    I've fallen off your lawn, and I can't get up.
    1. Re:Such nonsense by TapeCutter · · Score: 1

      Been coding in C for 30yrs, python for about 5. Never had a problem with a C statement accidently falling out of a C statement block, had plenty of Python indent problems that change the logic flow. If you have delimiters you can spot (harmless) missing indents with the naked eye, when the indent is used as a delimiter how do you spot a (harmful) missing indent?

      --
      And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
    2. Re:Such nonsense by goose-incarnated · · Score: 1

      No. It limits expressiveness so that we can all read each other's code without having to refactor the whole bloody mess. It does what c coding standards within an organization do, only it does it for everyone who writes in the language. Which is bloody awesome.

      No. It forces the programmer to a coding style that could have been easily performed by an indent program in C. You're placing the cognitive load for coding style on the programmer when you use python. In C the cognitive load can be offloaded to an indent program (which in practice happens more often than you think - my repo commits go through indent).

      Now you could argue that it is better for the programmer to use brainpower for coding style rather than making a program do it, but I'm pretty certain that loading the programmer more than necessary is not a good thing.

      Anyway, in my experience with python, its developers and its community, python programmers don't read each others code - the code never lasts long enough to be that durable, and is never maintained by anyone other than the original author. I once maintained a codebase that was originally written for 8-bit micro's, ported to two different 16-bit architectures, ported to two different 32-bit architectures with bugfix commits from around 100 developers and enhancement commits from a further 50, and is still now, after 25 years, being maintained and used. The language used braces. Call us back when a python codebase has so many readers and committers over 25 years. All my experience has been that, as projects get larger and more people join, python get's more unwieldy and harder to maintain, much like php.

      --
      I'm a minority race. Save your vitriol for white people.
  148. Re:Such potential by fahrbot-bot · · Score: 1

    (And while we are at it, I have done real work in > 20 different languages of various language types, so I have a bit of an intuition whether one is harder to use or not...)

    Careful Grasshopper. I have 30+ years as a Unix system programmer/admin and Unix/Windows software developer on - literally - just about every type of system there is from PCs to Cray supercomputers and probably have more programming experience than you, in more languages. I've worked at NASA, The New York Times and, presently, a large defense contractor - all in both research and production environments.

    That aside, you haven't countered my points at all. Sure, perhaps you find Python easier to read, write and clearer because it's more compact (that last point is extremely debatable). Those are all good points, but you haven't (and can't) offer any argument that white-space block delimiting offers any actual enhanced programming benefit over brace and other delimited languages. There are, in fact, are many, many posts in this thread alone demonstrating clear and practical problems with Python indenting.

    And, in point of fact, the Python and Nim language developers have specifically stated that their languages use the off-side rule because they believe it to be "more elegant", so I can blame them for not thinking beyond that to more practical issues. Issues that apparently plague real people, doing real work, in diverse environments that would not and/or are not issues in brace/other delimited languages.

    Don't let your love for the language blind you to its problems or shortcomings.

    --
    It must have been something you assimilated. . . .
  149. So many invalid arguments by fyngyrz · · Score: 2

    Yes, but it's quite possible that the code won't parse correctly w/o the braces (or with extra braces), where improperly indented Python probably will, and just execute incorrectly.

    Your argument that your poor code is likely to operate in a poor manner is not a valid objection to Python's indentation. It merely condemns your abilities as a coder (and perhaps your ability to choose an appropriate editor as well, but I repeat myself.)

    Write good code, no problem. Your argument simply boils down to you claiming you're a lousy programmer. As do many similar arguments, such as thinking types are required because you "might" call a function wrong, or use a variable in some stupid way. If you call the function wrong, or misuse a variable, you are failing as a programmer. Do it right. Problem solved.

    Back in the day, when we were writing in assembler more often than not, you'd have been laughed out of the building if you complained that the assembler should "know" what it was looking at beyond the most simple atomic architecture-related constructs. The fact is, as a decent programmer, you should know what you're looking at, and what you are doing at all times. If you don't -- the problem is 100%, entirely, beginning-to-end -- yours. You need improvement. You should seek it. Your failings will lead to bugs. Not the language's failings -- yours.

    --
    I've fallen off your lawn, and I can't get up.
    1. Re:So many invalid arguments by fahrbot-bot · · Score: 1

      You are hilarious. I wish I could mod you +1 Funny. Oh, to live in the fantasy world in which you, barely coherently, described, where nothing ever goes wrong and/or you never have to deal with foreign code (person, editor, source, etc...). I especially liked the bit where you deny, then acknowledge the language's failings. Man-o-man you have a bright future as a comedian - because if you were serious, it's obviously *not* programming. Perhaps as a Script Kiddy, but not actual programming.

      Well done Krusty; well done.

      --
      It must have been something you assimilated. . . .
    2. Re:So many invalid arguments by fyngyrz · · Score: 1

      Oh, to live in the fantasy world in which you, barely coherently, described, where nothing ever goes wrong and/or you never have to deal with foreign code (person, editor, source, etc...).

      I only work with good programmers. Sorry to hear you can't manage the same. Given your admitted limitations -- such as being unable to cope with a simple indentation mechanism -- perhaps that's just a matter of preferring to work with your peers.

      because if you were serious, it's obviously *not* programming. Perhaps as a Script Kiddy, but not actual programming.

      LOL. Reality says otherwise than your feeble guesswork. ;)

      --
      I've fallen off your lawn, and I can't get up.
    3. Re:So many invalid arguments by fahrbot-bot · · Score: 1

      Oh you were actually serious. Well, then...

      Examining this thread and your comments as a whole, it's a shame you can't attempt make technical arguments without resorting to demeaning the other person. This speaks volumes about your character and the strength of your arguments - or lack thereof with respect to both.

      Best wishes.

      --
      It must have been something you assimilated. . . .
    4. Re:So many invalid arguments by Anonymous Coward · · Score: 0

      I've been using Python for quite some time on a 100000KLOC project. Static typing *is* necessary sometimes. Not for readbility, but for refactorings. On such a big project (and, well, it's not even that big). it's very dangerous to search/replace function calls here and there. That's very error prone...

      So I enjoy Python a lot, that's for sure and it gives me quite a productivity boost. But as soon as I want to refactor, then well, I have a feeling that it's treacherous.

      And don't come with "you should have unit test". We all know that 100% coverage is not that common, especially on quickly evolving projects.

    5. Re:So many invalid arguments by Dog-Cow · · Score: 1

      The purpose of braces are two-fold: let the compiler know what's going on and let the reader know what's going on. It takes no thought at all from the programmer and only needs to be done once. The intent can't be messed up by any of the zillion transmission methods, including, but not limited to, email, web forums, or differences in editors or editor settings. Pretty formatting is a key-stroke away on any code editor worthy of the name, and many will auto-indent code as it's pasted in.

      On the flip-side, you have Python, where any of the above transmission methods, plus a whole lot more, can cause the original indentation to be lost. On top of that, the editor cannot infer semantics when code is pasted in, so the programmer needs to analyze the surrounding code and make sure the indentation of the pasted code is correct. In other words, there's no way to automate. Any time you have the developer doing work the computer could have done, you're doing it wrong. The entire purpose of a computer is to automate tasks. (And provide video game entertainment, of course.)

  150. Re:Such potential by ShanghaiBill · · Score: 1

    I have programmed extensively in Python for more than a decade and never have indentation 'goofed up'.

    My guess is that you work in a team of one. If you exchange or merge code from multiple people, then you will often struggle with whitespace issues. I help out with an after school program that teaches kids to program. The newbies use Scratch, but after a year they use Python. This mostly works well, but the kids often have whitespace issues, both individually, and when sharing code.

  151. Re:Such potential by complete+loony · · Score: 1

    Settings that change language semantics? God no. A line of code should have exactly one meaning no matter what context it is written in. How the hell can I understand code written by other developers if I have to keep checking for settings like this?

    --
    09F91102 no, 455FE104 nope, F190A1E8 uh-uh, 7A5F8A09 that's not it, C87294CE no. Ah! 452F6E403CDF10714E41DFAA257D313F.
  152. Re:Such potential by fahrbot-bot · · Score: 1

    Settings that change language semantics? God no. A line of code should have exactly one meaning no matter what context it is written in. How the hell can I understand code written by other developers if I have to keep checking for settings like this?

    I know, right? But I kid you not: Strong Spaces

    [ I got modded "Funny" for that, but hope that's just because "Scary" isn't an option. ]

    --
    It must have been something you assimilated. . . .
  153. Re:Such potential by Anonymous Coward · · Score: 0

    Indeed, and if you need to add more dimensions, there is the itertools.product function, which is the true Python way of solving more complex problems.

    for (x,y, z) in itertools.product(range(width), range(height), range(depth)):
            code here

    With the added bonus that its values don't actually have to be ranges, but can be any kind of iterators.

  154. Re:I wonder if this is a kind of copyright protect by phibermon · · Score: 1

    Agree, I'm not particularly proud but I suspect that such 'tactics' are commonplace and I think it's kinda sad that honest and noble people engaged in business often fail or end up at the bottom of the pile simply because they do the right thing. I've been 'pushed out' of businesses in the past for standing my ground when it comes to issues of morality and even law - and that was fine at the time because nobody depended on me. Now I'm left with little choice but to go with the flow unless I want those that rely on me to pay the price for the sake of my pride. From covering up data breeches to knowingly shipping faulty products - I and I suspect many people here have seen everything from the questionable to the downright illegal happen frequently. Not even giants like Google pay their tax, don't be evil? more like don't get caught being evil.

  155. Re:Such potential by tepples · · Score: 1

    So how do you "remember to indent your code right" when you're trying to mix Python code provided with a developer with Python code generated by a code generator?

  156. Re:Such potential by Anonymous Coward · · Score: 0

    > In Python, a string that starts with "'" must be ended with the same "'".

    Or you can use 3 apostrophes. '''Hello'''

    > You can also start with '"' and it must end with '"'. Or any three-character combination of single or double quotes.

    Completely false:

    >>> print '"'hello'"'
        File "", line 1
            print '"'hello'"'
                                      ^
    SyntaxError: invalid syntax

  157. Why some sugar and not others? by tepples · · Score: 1

    Anonymous functions are syntactic sugar. They have no programming value of their own.

    I disagree with your claim that syntactic sugar is valueless. Calling a function in an argument to another function (f(g(x))) is also syntactic sugar, as instead you could require assigning the value to a local variable. The same is true of expanding tuples on the left side of an assignment (a, b = f(c)) or even putting more than one operator in an expression ((x + y) * z). The with and for statements are equivalent to various combinations of while and try. Without syntactic sugar, we would all be programming in assembly language.

  158. Meh by MSJos · · Score: 1

    Yet another zealot who think's he's discovered the One True Way, whereas all he's really accomplished is that he's easily replaced, which is what companies love.

    (And btw, all these other languages are partly inferior because they didn't adopt Python's genius significant whitespace. Most language designers must be stupid to miss that!)

  159. Re:Such potential by Anonymous Coward · · Score: 0

    Are you insane or just so clueless about Python that you're making things up as you go along? Of COURSE you don't often need a formatter in Python; that's the entire point! And what about pylint or PythonTidy? Or are you going to pretend that nobody uses those next when they deviated a bit in the ways Python allows?

    In fact you have yet to make a single cogent argument that doesn't boil down to THIS IS MY RELIGION, AND BRACES ARE THE ONE TRUE SYNTAX. To whit:

    >Language is a tool. It should give me, the developer, the choice - not take it away from me.
    >Python is inferior. Because it provides less tools to its developers.

    You say this, but you have yet to prove how braces are magically a "tool" compared to whitespace, nor how whitespace is "less of a choice" than having to use braces? How do either of these things make Python inferior to C, which requires ten times as much code to say the same thing a single line of Python does, or requires entire frameworks to turn it into a C-syntaxed variant of Python anyway? Not in any substantial way that you run into in the real world - you can contrive examples, and pretend that one error happens more often than another, but neither of those things are good enough to convince me because I have years of experience with many other coders and projects (in both languages) telling me otherwise.

    >If nothing else, use of the invisible characters for something as important as control flow is actively helping "the ability to screw things up".

    How does it add any more to the ability to screw things up than not enforcing whitespace? I'm not telling you one is better than the other, just that I have no idea why whitespace is so much worse, given the constraints and syntax of each language. And yet, I can pick random Python apps online and they all seem consistently similar and readable to me, but every other C application is a bit different or has style issues up the wazoo. Why is that? It's not that my years of experience have left me deficient, it's that one language does some things more clearly, because that's what it was designed to do. Is it perfect? No. But is it "worse" for the types of programs it's meant to work with? Hell no. You can disagree if you wish, but you'll have to do a lot better than this to convince me of anything.

  160. Re: Such potential by Anonymous Coward · · Score: 0

    > Or, whitespace should not matter like it doesn't matter in the vast majority of programming languages.

    Just use those other languages then. No one cares if you don't use Python.

  161. Re:Such potential by Pinky's+Brain · · Score: 1

    Didn't Python 3 finally disallow mixing spaces and tabs for indentation by default? Should have done that from the start.

  162. Re: Such potential by Pinky's+Brain · · Score: 1

    They finally disallowed that in v3 ... shame so many are sticking to the previous one.

  163. Re:Such potential by Pinky's+Brain · · Score: 1

    Making it more difficult for modern coders to quickly compose SQL queries could be considered a valuable feature ...

  164. Re: Such potential by Anonymous Coward · · Score: 0

    This deserves a 5, but since AC posts are no longer welcomed here, I guess only ACs will value your contribution. Congrats on the insight.

  165. Re: Such potential by Anonymous Coward · · Score: 0

    > The supposed advantages Python gives to readability (forced whitespace), is FAR outweighed by the uncountable man-years of losses since Python doesn't allow the coder to specify input & return Types.

    Your assertion is false. I haven't lost anything due to input and return types. In any case you could use decorators or assertions if that were important.

    One could equally claim that Java and C++ lost uncountable years due to having to write every possible combinations of parameters and returns as overloads.

    If Python lost you time then don't use it.

  166. Nim does not have a wikipedia entry by Anonymous Coward · · Score: 0

    Nim is so new that it does not even have a wikipedia entry. Can you really use it in production???

  167. Re:Such potential by Unknownus · · Score: 1

    oh, and it would not really hurt if you did have static data types.

    The Cython language is exactly this: a superset of Python with static type declarations.

  168. Syntax by Pseudonym · · Score: 1

    The language offers a syntax inspired by Python and Pascal [...]

    I think that's a nice way of saying "Oberon".

    --
    sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
  169. Re:Such potential by Anonymous Coward · · Score: 0

    > Those are all good points, but you haven't (and can't) offer any argument that white-space block delimiting offers any actual enhanced programming benefit over brace and other delimited languages.

    Whether there are benefits of using white-space or delimiters is irrelevant. If you don't like Python then don't use it. I find that having me (and anyone reading my code) and the compiler understanding the code the same way is useful.

    > There are, in fact, are many, many posts in this thread alone demonstrating clear and practical problems with Python indenting.

    No. Wrong. There are many posts whining that they don't like it, probably because they want to use different styles, and probably different from each other too. Many of the posts that you see as 'practical problems' actually make incorrect statements about the language. Many of the 'problems' are most likely related to what their editor is doing: inserting tab characters, reformatting, or other.

  170. Re: Such potential by orlanz · · Score: 1

    If you think that's an issue this discussion is over and really no point in having it. Python defines a coding standard so that all read, write, and understand the same. If you think that is a weakness, well I hope I don't ever need to review your version of what ever language you choose.

  171. Re:Such potential by loftarasa · · Score: 1

    I prefer to have a visual marker that block is closed. You know, like a dot at the end of the sentence.

    Or, you know, like indentation.

  172. Re:Such potential by TapeCutter · · Score: 1

    I like Python and use it regularly to automate builds, indents make the source easy to read but replacing block markers with indents was not a good idea since it make it easy for statements to fall outside the intended block.

    --
    And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
  173. Re: Such potential by fahrbot-bot · · Score: 1

    And if the indenting is, somehow, lost or messed up, your program logic is toast. Not so with other languages. So, yes, relying solely on white space for correct program logic is a potential weakness. It's mind boggling that you can see, or admit, this little fact.

    In a perfect world you're correct and it shouldn't be an issue, but the world isn't perfect. The strong Python coding standard means nothing after this simple vi command: 1,$s/^ *//

    --
    It must have been something you assimilated. . . .
  174. Re: Such potential by spongman · · Score: 2

    Except it doesn't complain when you have a mismatch.

  175. Re:Such potential by shutdown+-p+now · · Score: 1

    It's actually trivial to generate Python code that way, if all you care about is syntactic correctness (rather than, say, preservation of whitespace) - you simply translate indentation into virtual "brackets" (which is pretty much implicit in AST form - and you do want to work with an AST for any kind of reliable codegen, anyway), splice your code in, then translate it back.

    If you want to preserve the original indentation, it's just a little bit harder, but not much. Basically, you just need to remember the whitespace information on your AST nodes. Then, when you reconstitute the code from the AST, you can do so with character-for-character precision.

    (Source: personal experience. I work on a Python IDE that has to deal with lots of that kind of stuff for e.g. implementation of refactoring. Once we had our whitespace-preserving AST, the rest was and remains easy.)

  176. Re:Such potential by shutdown+-p+now · · Score: 1

    The generator ought to take care of such things, if it's written well (i.e. it actually understands the language it generates). Indenting code properly isn't really any harder than putting the right number of braces in the output.

  177. Re:Such potential by TapeCutter · · Score: 1

    with a sensibly designed language, just about every editor out there can format code properly with a single keystroke. The only possible argument in favor of Pythons implicit blocks, forcing idiots to indent their code, is essentially meaningless.

    Exactly, I'm a big fan of Python, despite the idiotic indent syntax. Really, who doesn't indent their code, and why should the rest of us be inconvenienced because of the very few unique snowflakes that have to be forced into indenting their code? It's a perfect example of the "cure is worse than the disease".

    --
    And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
  178. Re:Such potential by ThePhilips · · Score: 1

    (Source: personal experience. I work on a Python IDE that has to deal with lots of that kind of stuff for e.g. implementation of refactoring. Once we had our whitespace-preserving AST, the rest was and remains easy.)

    You have different use case, which is 100% controlled code. IOW, you can rely on the original indentation to create the AST.

    My use case is:

    {user-start-code}
    {generated-code}
    {user-finish-code}

    where "user-*-code" is an arbitrary user supplied string.

    If the user start/finish code is just a function call, then it is all fine.

    But if the user code is "if something:{CR}{TAB}aaaa", then the user intent simply can't be made clear from the Python's syntax: (A) is it "if (something) { aaaa }" or (B) it is "if (something) { aaaa" (and the closing "bracket" is in the finish code).

    I've spent few hours tinkering, but there is simply no way to tell A from B definitively in the Python's syntax.

    P.S. It is a sort of preprocessor, which allows to mix plain text with an arbitrary language. In generated output, the plain text is simply replaced with the print statements.

    --
    All hope abandon ye who enter here.
  179. Re:Such potential by shutdown+-p+now · · Score: 1

    Ah, I see what you mean now.

    Yes, in a case like that - for templating languages and such - you really do want the explicit block terminator. And that's what people do to Python in similar circumstances - just add it. Have a look at Bottle's SimpleTemplate engine - you might actually be able to reuse that directly as it's very lightweight, and it's generic and bare-bones enough to not really be tied to HTML in any way.

  180. Re:Such potential by gweihir · · Score: 1

    Your 30+ years are nice. I have the same.

    The reason I have not countered any of you point is that you have not made any. You just stated "I do not like this, hence it is broken". Pretty unsophisticated. I have answered to that "Well, I like it, hence your opinion is not universal", and no, I am not blinded by anything.

    All I hear is you whining that you cannot cope. Then don't and go somewhere else. Not all people have your limitations.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  181. Re:Such potential by ThePhilips · · Score: 1

    Blocks that are normally indented now have to be closed explicitly with an end keyword.

    I see what they did there.

    Highly un-Python-ic: a new keyword to close the if/for/etc statements.

    But it is a confirmation of my own conclusion that with the vanilla Python syntax that is impossible to accomplish.

    Python support for me wasn't as important. I simply wanted to see and compare use of different languages in such context. And see whether a generic, language-neutral preprocessor makes any sense. (Here it is, btw.)

    --
    All hope abandon ye who enter here.
  182. Re:Such potential by angel'o'sphere · · Score: 1

    If my employer would try to force me using something like Whitesmith style, I would not only quit but sue him for harassment and damages to my brain and visual cortex.

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  183. Re: Such potential by gnupun · · Score: 1

    the uncountable man-years of losses since Python doesn't allow the coder to specify input & return Types.

    I agree, without types I have to read the code or comments to figure out the types of input/ouput types of a function. But Nim requires input and output types for functions.

  184. Strange : in strange places by Anonymous Coward · · Score: 0

    Just like in Pascal, which never grew on me.
    C's syntax is just so homely.

    1. Re:Strange : in strange places by Anonymous Coward · · Score: 0

      Yeah, because everyone uses "==" in Math. Sure.

      Also, using "=" for assignment also makes things very clear. Not to mention "not" as "!", yep, totally homely. My mother uses it: "!touch that pudding!" Sorry, that must be a double negative...

      The only thing to criticize in Pascal is "" as different, but even that has a logic. The assignment operator should be written with a box around a variable and an arrow pointing to the box with the value on the other side: something like [A] - 2, meaning variable A now holds a 2 value. Except for some assemblers, we don't usually see that (APL?).

      C is well done for its purpose (being near iron level), but it feels a lot alien.

    2. Re:Strange : in strange places by Anonymous Coward · · Score: 0

      Funny how we can't write different (the chars "less than" and "greater than") in Pascal on /.

      Tells a lot about the current nature of the site: more worried about avoiding trolling than allowing code snippets.

      I ever I saw a sign this site is deranged, this is it.

  185. Bash scripts and C++ by Anonymous Coward · · Score: 0

    Bash scripts and C++ should be enough for everyone. The rest is just pointless baggage..

  186. Re: Such potential by Anonymous Coward · · Score: 0

    +1 for nim .

  187. Re:Such potential by Anonymous Coward · · Score: 0

    I'll see your personal experience and raise you mine. I've been indenting code since my FORTRAN-77 days. I've been a professional python programmer for about 6 years now. I've been using emacs for perhaps 30 years. Even with all that experience and tooling, and a desire to write well structured code, I hate, hate, hate python's model of using indentation to denote block scope. Love the language as a whole, hate this feature. I've never gotten used to it, even with emacs doing most of the work.

  188. Re:Such potential by Daniel+Hoffmann · · Score: 1

    My fellow co-works give me flak for writing like this:
    foobar= foo + bar

    While they write like this:
    foobar = foo + bar

    Personally when reading other peoples code I don't mind either, I don't go around their code removing the spaces, but I am so used to writing without the space before the equal sign that even if I am trying to write code in their standard I sometimes forget. They say they can see which parts of the code was written by me just because of that little quirk. That quirk would not be lost in Python, but granted, it removes the other developer quirk:
    function() {

    versus:
    function()
    {

    We considered implementing syntax coding standards, but honestly I do not think they help all that much so we never ended up using any. And really, individual coding styles are sometimes useful, if I see a code with the curly braces in the following line and I have a problem with that code I know exactly who to talk to without needing to check git.

    I first learned to program in Pascal, in which that statement would be like this:
    foobar:= foo + bar

    versus
    foobar := foo + bar

    Since pascal has two characters for the attribution operation it looks odd with the space before it.

  189. Re: Such potential by gbjbaanb · · Score: 1

    Ahah! suddenly the reason for getting more women in IT is clear.

  190. Re:Such potential by Dog-Cow · · Score: 1

    You are a moron. A truly fucked-up, head-up-the-ass-into-his-colon idiot. And you're stupid.

    1) It may not be my blog "engine".
    2) Fixing messed up formatting of any C-based language is a keystroke away, so we don't have to waste time making sure some random blog or forum software won't mess it up when it's copy and pasted on any of several OS's or desktop environments.

    Using your brain instead of the computer is stupid. That's why we invented computers: to automate and remove the drudgery of manual/mental labor.

  191. It'll be the deletionists new toy by Anonymous Coward · · Score: 0

    I guarantee that same anal pedant saw this page, went to wikipedia just to make sure the article was deleted, lock, protected, closed for being off topic, it's all the same, wikipedia deletionists and stackoverflow morons.

  192. why not just use c/c++ by Anonymous Coward · · Score: 0

    Suddenly, everyone goes back to statically typed language again.

  193. Re:Such potential by pscottdv · · Score: 1

    Wait... You work in a language that gives you a choice of how to enclose code blocks? What language is that?

    --

    this signature has been removed due to a DMCA takedown notice

  194. What a great new way to get hacked! by hlavac · · Score: 1

    All it takes is one little const buried somewhere and you are running the malware code as part of the compiling without being aware of it! What a great feature - for an utopic world where everyone is nice.

  195. Re:Such potential by ThePhilips · · Score: 1

    If you wish, even C:

    #define BEGIN {
    #define END }

    And C++ has some of that already built-in.

    --
    All hope abandon ye who enter here.
  196. Re:Such potential by KlomDark · · Score: 1

    You sound very closed minded. You confuse "not coding to your exact personal style" with "not a good coder". There's too much of that mentality lately, so I probably wouldn't choose to work for you anyway.

  197. Re:Such potential by pscottdv · · Score: 1

    Touché. I guess I wasn't clear. #define lets you change which symbol you use to enclose code blocks. But when you said your language should give you a choice, I thought you meant "a choice between using indentation and using block enclosing symbols."

    --

    this signature has been removed due to a DMCA takedown notice

  198. Re:Such potential by tibit · · Score: 1

    I don't think that the shortcomings of broken blog engines are supposed to influence programming language design.

    If I have to copy-paste something from a blog into an editor, then run autoformat on it, I might just pass on. Frankly said, people with shit worth posting know how to manage their formatting. If a post is so broken as to be unreadable, it's most likely useless code anyway.

    --
    A successful API design takes a mixture of software design and pedagogy.
  199. Re:Such potential by Anonymous Coward · · Score: 0

    here's where 'whitespace only' indenting messes up. ever see what blogs do when you try to post code? yeah. that. and its a reality, too. you will never be able to guarantee that posted code won't be 'changed' by some web formatter or email formatter!

    You transmit a message over a communication channel that corrupts the message, and then you blame the message for being corrupted.

  200. Re: Such potential by Anonymous Coward · · Score: 0

    You formatted your post in disagreement with your opinion. Here, FTFY:Pythonpissesmeofflikemakefilesdid--whitespaceshouldNOTaffectthesemanticmeaning.

    Your reports must be fantastic without all those indented bullet points...

    Finally, nobody counts spaces... that's why Tab characters were invented.

  201. Re:Such potential by tepples · · Score: 1

    if it's written well (i.e. it actually understands the language it generates)

    Parsing arbitrary user-written code is more involved than generating code. When you generate code, you deal only with a subset of the language that your generator emits. When you parse code, you have to deal with essentially the entire language.

    Indenting code properly isn't really any harder than putting the right number of braces in the output.

    To indent the inner block properly, a code generator has to parse the inner block in order to see where the open parentheses, multiline quotations, etc. are.

  202. Re:Such potential by Anonymous Coward · · Score: 0

    Thanks for that link to PEP 3107, which brings some of the static-typed capability to the Python language. However, it appears to only be applicable to Python 3.0+. My target distribution is RHEL/CentOS 6.6, which ships with python 2.6.6 -- so scripts using that language feature will not execute there.

    $ python
    Python 2.6.6 (r266:84292, Nov 21 2013, 10:50:32)
    [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> def foo(a: int):
        File "", line 1
            def foo(a: int):
                              ^
    SyntaxError: invalid syntax
    >>>

    # yum provides "*/python3"
    No Matches found

    Mixing the good features of Python with a good static typing system would certainly be a good thing.

    Well said. Ideally Python would've had these features earlier -- better late than never I guess. This capability is such a fundamental shift that it would help if people qualify which Python version they are talking about when discussing that language's features.

  203. Re: Such potential by Anonymous Coward · · Score: 0

    Finally, nobody counts spaces... that's why Tab characters were invented.

    Wrong. Per Python's PEP-8 guidelines you are supposed to use spaces and not tabs for the whitespace. A language mis-feature that is trying to be "fixed" with best-practices documentation of standards.

    You can read it yourself at: https://www.python.org/dev/peps/pep-0008/
    Unfortunately that URL gives HTTP 503 errors (no doubt the backend is implemented in python).

  204. Re:I wonder if this is a kind of copyright protect by Karmashock · · Score: 1

    You had me until corporate taxes.

    Tax policy actually makes no sense at all. The income tax itself is problematic. And it is especially problematic when you tax a business twice.

    If corporations paid taxes the way that individuals paid taxes that would mean 60 percent or so of the corporate income would go to the government and then from that remaining 40 percent you'd pay out dividends or invest in further corporate growth etc. It doesn't work.

    Which is why corporate income tax tends to be very very very low. Everyone understands that the whole double taxation concept is a stupid one.

    That said, the income tax system is itself problematic. Worse is the estate tax or as it is better known the "death tax" which is the reason corporations have taken over. Corporations pay no death tax. A family business has to sell off half their value every generation just to pay the estate tax. It is ruinous.

    There are a lot of aspects of the taxation system that are simply stupid.

    The US Federal government used to fund itself almost entirely with a tariff. The issue is controversial but there are some really nice features of that tax. One, it is very easy to collect and very simple. Two, tax fraud is smuggling and smuggling is tax fraud. And that means the IRS etc has a great interest under such a system to control the borders otherwise they'll lose revenue to smuggling. That means the borders are policed and the US Federal government will care deeply about what crosses the border because that is how they get paid. You'll note that the modern US government says they can't police the US borders. Do you believe that? Really? If that was how they generated the revenue that kept the lights on, they would probably find out how to do it.

    Here you'll point out quite sensibly that the Feds couldn't possibly fund all the things they do with a straight tariff and that is quite right. However, practically everything they couldn't fund with that either shouldn't exist or should be done by the states. And the states have another good tax which is the property tax.

    --
    I've decided to stop wasting my time responding to AC trolls/sockpuppets... so if you want a response from me... login.
  205. Re:Such potential by Lost+Race · · Score: 1

    I would like to propose a moratorium on comments of the form, "I manage a team and would never hire you." They add nothing to the discussion and only lead to useless dick waving competitions. ("Oh yeah? Well, I'm president of a Fortune 137 company and *I* wouldn't hire *you*!" "Oh yeah? I'd never accept an offer from your crappy company and you couldn't afford me anyway! Neener neener!" "Oh yeah? [etc]")

  206. Nim's community is very friendly and helpful by gmpreussner · · Score: 1

    I have been frequenting the #nim IRC channel for several months now, and I have to say that the posted conversion snippets are not at all representative. There are usually way over a hundred developers present in the channel, many of which are highly experienced and professional software engineers in various fields. The senior staff in particular is extremely friendly and helpful, and as a newcomer with lots of beginner questions I immediately felt welcome. I have witnessed many enlightening discussions about compiler design and general software architecture, not just covering Nim, but also many other programming languages and academic research projects. I also cannot approve of the criticism against Araq, the main driving force behind the language. He engages with users on a daily basis on IRC, the forums and GitHub, and is considering their opinions in the design of language or standard library features. Quite frankly, this is one of the things that I find particularly interesting about the development of Nim, because I feel that I can actually participate in the language design. The statement that Araq made with regard to implementing something because he is "tired of arguing" was certainly made out of frustration from dealing with certain users who possibly lack the depth of understanding, the professionalism and the patience that it takes to get things right. I am not aware of any single language feature that was put in place because of laziness or as a shortcut. The language still needs a lot of work, but the potential is evident. It is actually quite remarkable what a few folks have been able to put together in their free time, and I love working with Nim already. I'm curious who posted the chat snippets above. They seem to cover only three users having a heated argument, and I wouldn't be surprised if the poster was one of them.

  207. Re:Such potential by goose-incarnated · · Score: 1

    That so many people dislike the Python indention model is not cause by it being bad, but by most "programmers" being rather clueless and inflexible.

    Ironically most "programmers" like it. Having the indentation forced upon the programmer does not in any way bring to my mind the word "flexible", so you're probably onto something with your statement being more accurate than you intended.

    --
    I'm a minority race. Save your vitriol for white people.
  208. Re:Such potential by goose-incarnated · · Score: 1

    I disagree on both points. First, directly posting compilable code is always difficult, that is why you attach it as ASCII. And second, after having done real work in Python, I find the brace-less style easier to read, easier to write and clearer because it is more compact. (And while we are at it, I have done real work in > 20 different languages of various language types, so I have a bit of an intuition whether one is harder to use or not...)

    Only 20? No wonder you like python ;-) FWIW, I've done real work in python too.

    That you do not like it is not the fault of the Python creator. Simply do not use it, but absolute statements about it being "wrong" or "false" or "offers absolutely no enhanced benefit" just demonstrates a problem on your side, not on the side of what you criticize.

    Actually parent posters all had points - the whitespace is just one of the ambiguities present in python code. The sloppy handling of the dictionary up the call stack results in scope changing when variable positions on a line change. Just like the whitespace issue, it causes the program top run without apparent problems but silently corrupt data.

    --
    I'm a minority race. Save your vitriol for white people.
  209. Re:Such potential by goose-incarnated · · Score: 1

    Settings that change language semantics? God no. A line of code should have exactly one meaning no matter what context it is written in.

    Python doesn't have this and yet that doesn't seem to have affected its popularity at all.

    --
    I'm a minority race. Save your vitriol for white people.
  210. Re: Such potential by goose-incarnated · · Score: 1

    If the software had an automatic means of preventing the code from compiling if the indentation didn't match the meaning, the bug could have been avoided. Python actually *does* have that feature.

    All languages with braces have had that feature from long before python. You can run the code through indent, you idiot.

    --
    I'm a minority race. Save your vitriol for white people.
  211. Re: Such potential by goose-incarnated · · Score: 1

    If you think that's an issue this discussion is over and really no point in having it. Python defines a coding standard so that all read, write, and understand the same. If you think that is a weakness, well I hope I don't ever need to review your version of what ever language you choose.

    Of course it's a weakness - in any language with delimiters (such as braces) you can easily run a script to indent it the way you like. With python you don't have the option to do so. This language feature is so difficult that no AI exists which will take your munged up python program (say, all on one line) and restore it to the original. The braces version is so simple that no AI is even needed - see the indent program.

    --
    I'm a minority race. Save your vitriol for white people.
  212. Re:Such potential by goose-incarnated · · Score: 1

    Python's entire objective is the human reader.

    If that were true python would not have invisible scoping rules that silently lose data. I'd rather have a program crash, but python is designed to silently lose data if you mistype a variable name or if you type it correctly too. The scope in python changes depending on the RHS and the LHS variables - their scopes are not predictable without reading through the program above if you change the sides they are on.

    --
    I'm a minority race. Save your vitriol for white people.
  213. This is awesome! by Anonymous Coward · · Score: 0

    Just in time for the Obfuscated NIM contest!

  214. Re: Such potential by Anonymous Coward · · Score: 0

    First, thank you for your polite tone; uncommon here, that already makes you 50% right off the bat. To tell you the truth I have my quibbles about Python (the C-like syntax) but the indentation idea is too dear to me to let the discussion pass by.

    Now, I suppose this is the content to which you refer:

    | Citation:
    |
    | Tabs or Spaces?
    | Spaces are the preferred indentation method.
    | Tabs should be used solely to remain consistent with code that is already indented with tabs.
    | Python 3 disallows mixing the use of tabs and spaces for indentation.
    | Python 2 code indented with a mixture of tabs and spaces should be converted to using spaces exclusively.
    | When invoking the Python 2 command line interpreter with the -t option, it issues warnings about code that illegally mixes tabs and spaces. When using -tt these warnings become errors. These options are highly recommended!
    |

    This is from a PEP or "Python Enhancement Proposals". SInce I'm not in the Python world (yet...) it's hard for me to tell what is already being practiced and what remains at the idea stage. Actually, that is described earlier in text as "Meta-PEPs (PEPs about PEPs or Processes)". Whatever that might mean, I believe it is even more vague.

    On a practical approach, some editors (Vim, for example), can be set to use spaces instead of physical tabs -- one can even select how many spaces. The discussion becomes then somewhat moot, IMHO.

    But I understand your point, and stand corrected about it. I see how someone using individual spaces might come to find that annoying (I have friends who do that and it annoys me to even see it). Thanks, again. I suppose that makes you 100% right.

    That notwithstanding, the central question here, as I understood, is mandating a logic structure by indentation in code versus allowing free text flow.

    That is akin to the discussion about good coding style which already has generated tons of lines in threads about taste issues. And in the end, for practical reasons (e.g. maintainability), some style is mandated -- and Python code is no different.

    I also understand that, on certain occasions, it's useful to have a special indentation -- for instance, to better convey the workings of an algorithm. I don't know how to solve that without abandoning the very useful resource that is having logic blocks delimited by indentation. Maybe I should start to code in Python to be able to present some useful suggestion.

    What I can say now is: use a pre-processor, do what you want and make it spit out Python.

  215. Yet Another Programming Language by packrat0x · · Score: 1

    Question to those in academia:
    Is it true that most students who get a masters in computer science create their own programming language as part of their studies?

    --
    227-3517
  216. Re:Such potential by Anonymous Coward · · Score: 0

    Like a Python developer, you didn't actually read or comprehend the actual article.

    I you actually understood the article, you would discover that it was a joke, really. What the analysis breaks the tokens down amounts to object/byte code. Yes, the authors of that article managed to discover difference between source code and byte code.

  217. Re:Such potential by shutdown+-p+now · · Score: 1

    Parsing arbitrary user-written code is more involved than generating code. When you generate code, you deal only with a subset of the language that your generator emits. When you parse code, you have to deal with essentially the entire language.

    Sure, but parsing only has to be implemented once, and then everyone can use it.

    And, coincidentally, Python contains its own parser in the standard library.

  218. Re:I wonder if this is a kind of copyright protect by phibermon · · Score: 1

    You raise very good points, I was referring to the scandal of companies like Amazon and Google using loopholes here in the United Kingdom to avoid paying the majority of what they owe in tax by shifting profits made in this country to other countries. But that said, I do see the importance of keeping business tax low especially given the points you raise (although the UK has one of the most favourable tax systems in the world for businesses and many companies and rich individuals are still choosing to cheat the system) Our western economy being based on the concept of continual growth it's reasonable to accept government claims that a higher tax on business would have a knock on effect that would harm individual households in the long term. It would be nice to see more transparency in such things and less closed door deals with our freely elected officials. Anyway I digress - Nim doesn't look bad but it's very hard to quantify the development efficiency of languages compared to others without long term use in business and for that to happen some early adopters have to take risks. It seems like a big ask. Are you yourself or anybody else aware of methodologies that can be used to quantify the (developmental) efficiency of a language? With so many factors - learning curve, error rates related to syntax possibilities/restrictions etc it seems very difficult to cast anything other than a 'gut feeling'

  219. Re:I wonder if this is a kind of copyright protect by Karmashock · · Score: 1

    Well, I believe your VAT is paid by people that buy things there and your sales taxes should also be paid. Whether they owe you income taxes on top of that is debatable.

    Lets say I am a company in the US and you call me up on the phone from England and order whatever it is I sell... I work out the import fees, and see to it that you pay sales tax... do I owe your government income tax as well? I don't think I do.

    Now you might say "but amazon has warehouses and people that work for them in the UK which makes that part of it a UK company"... and to that I'd point out that they pay property taxes, fuel taxes, their employees pay income tax, and there are all sorts of taxes and fees that that portion of the company pays. So I don't think it is reasonable on top of that to ask for an income tax when the shareholders are already paying that.

    Again, the income tax as applied to corporations doesn't make a lot of sense. Again... everyone knows it. Which is why no one tries to rake companies too hard over the coals for it. Its a dumb tax.

    And there are a lot of dumb taxes. A lot of the economic problems we're suffering in the US and in Europe are the result of dumb taxes. A lot of the reason we lost so much business to china is because their taxes are a lot less dumb. The wage differences are relevant as well sometimes but it is mostly a matter of pointless regulation that forces companies to employ huge numbers of people just to fill out government documents that no one reads.

    Did you ever see the movie Office Space? Remember how their bosses were obsessed with TPS reports to such an extent that they were more important then any work that actually got done? Well, our governments are doing the same thing.

    In the average US hospital the upper THREE flours of the hospital are filled with accountants, lawyers, and various people that process hospital paper work. All of that has to be paid for by the patients and the insurance companies and the government via the subsidies. It is a huge waste of time and money. SOME paper work does need to be done but it should be what is needed and nothing more because every bit you require beyond that simply makes everything more expensive.

    The US companies set up in Ireland because the Irish were willing to have reasonable tax policies in return for getting a lot of jobs.

    Any country not willing to do that is going to lose jobs to countries that do.

    Choose carefully.

    --
    I've decided to stop wasting my time responding to AC trolls/sockpuppets... so if you want a response from me... login.
  220. Re:I wonder if this is a kind of copyright protect by phibermon · · Score: 1

    I see, well you clearly have a much better grasp of the issues than I do. Much of what I know about tax evasion in this country is from political debates and (biased?) media stories.
    It does seem unfair especially given far more money was used to bail out private banks than could be clawed back by forcing companies to adhere to UK law and other countries seem to do just fine without needing such additional taxes.
    I appreciate you taking the time to discuss this and explain your stance but I'd be doing you a disservice without learning more. I'll do some more research before venturing the topic again :) thanks!

  221. Re:I wonder if this is a kind of copyright protect by Karmashock · · Score: 1

    At the end of the day, you want to make sure your taxes are not so high that you lose more business by raising the taxes then you gained in additional revenue.

    What is more, when you make complex taxes that only apply in certain circumstances and not in other then you encourage people to do things in just such a way that they don't pay those taxes. Often this just requires filling out some paper work to declare one thing or another under some provision of some law rather then another. And all of that legal and financial finesse costs money because you have to hire people that know how to play the game then pay them to play it for you.

    In the end, it mostly just hurts small businesses and medium sized businesses that can't thread the needle. And that is in many cases the point. Kills competition which allows established companies to operate largely unopposed because no one can handle the paperwork required to eliminate the taxes AND run the company at the same time from scratch.

    In any case... good day to you.

    --
    I've decided to stop wasting my time responding to AC trolls/sockpuppets... so if you want a response from me... login.
  222. Re:Such potential by Marginal+Coward · · Score: 1

    Coincidentally, I did pursue the lawsuit idea when I was first hired, but I wasn't able to find a lawyer who would take the case. [sigh]

    Actually, although I hated the Whitesmiths style at first and had a lot of trouble reading it, I was eventually able to adapt. Ironically, once I realized that it was similar to Python except with (seemingly) unnecessary braces, it became easy for me to read.

    You can get use to any style that's applied consistently, and I eventually found a certain kind of clunky beauty in my employer's prescribed style. The entire organization uses it very consistently, which turns out to be more important than the fact that the style itself is basically dopey. Of course, the term "dopey" is subjective, but in this case I define it as meaning "non-minimal and not similar to any of the several established industry standards." It certainly qualifies under that definition.

  223. Re:Such potential by gweihir · · Score: 1

    Really, all there are are limitations on your side. You want/need simple, go program BASIC, not some tool you are not equipped to handle.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  224. Re:Such potential by goose-incarnated · · Score: 1

    Really, all there are are limitations on your side. You want/need simple, go program BASIC, not some tool you are not equipped to handle.

    Python *is* being sold as the simpler option, and indeed it is becoming more popular with the non-programmer programmer (weekend crowd) than it is with the professional developer.

    --
    I'm a minority race. Save your vitriol for white people.
  225. Re:Such potential by angel'o'sphere · · Score: 1

    Well there are two coding/brace styles that hurt my eyes and one is that with W. And the other one is where the opening brace is on its own empty line. Actually that is the same with that W guy. Does not matter how it is indented.

    I doubt I ever could adjust to that, but luckily everyone I met the recent 15 - 20 years used the same style. Perhaps because Java introduced a good style, see below.

    That is basically K&R style with the opening brace of the function on the line of the function header.

    There are even worth styles, just found the Rattliff style, oh my gosh :-/

    And yes, I would not work in a shop that had an absurd coding style for braces ... I would make mistakes and I hate making mistakes.

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  226. Re:I wonder if this is a kind of copyright protect by phibermon · · Score: 1

    You've hit the proverbial nail on the head it seems. Succinct and I can't fault your assessment. It troubles me that I saw so little regarding an issue that is very much at the heart of our next election. You've given me much to think about - good day to you also.

  227. Re:Such potential by Anonymous Coward · · Score: 0

    Interesting use case. I would say less common, but there are more students learning a programming language than pros using it; also, Python seems to be considered good for teaching thus making it a bigger problem.

    In spite of others claiming a language should be apt to being edited with any editor, IMHO we must consider the ability of an editor program to insert a piece of code starting at, say, column 20 and keep indentation relative to that column. Otherwise, the source code will be messed up, no matter what language you choose.

    People give little importance to this fact, it seems, and are perfectly content that C-code -- because it has curly brackets -- still compiles OK, even if in a degenerated format. But is this really ok? Does that contribute to comprehension and learning? Do we want beginners to give less importance to code tidiness?

    As long as it works, one can always discount some points for messy out-of-style code, I suppose. But since now we know there could be a tool which automatically adjusts code on-the-fly to be perfectly indented all the time, do we really want to punish students for not doing menial tasks? Of all occasions, in a Programming class? Not a great idea, me thinks.

  228. NOT "new" by Anonymous Coward · · Score: 0

    I myself had this Sappeur Language quite a bit before Rust.

    Now, if you would like to leave my lawn...

  229. TLDR; Wean Yourself Off Pampers by Anonymous Coward · · Score: 0

    For crybabies there are GCs. Grownups can clean up their shite themselves. Immediately and incrementally. I dont distribute shit around the house until I literally cannot do a step without hitting a shitty pampers.

    Instead I incrementally go to the loo and immediately get rid of the stuff. I also use a wastebasket instead of randomly dropping dirt onto the floor. Immediately when there is waste.

  230. Re:Such potential by vilanye · · Score: 1

    Enforcing whitespace in the language weakens it.

    Add in the sad decision to not make everything an expression in Python and you have a weaker language with zero benefit to go along with the enforced whitespace.

    Guido is almost as stupid Rasmus.

    Python used to not have any scoping at all which is why you have all those redundant self self self self self....

  231. Re:I wonder if this is a kind of copyright protect by Karmashock · · Score: 1

    If you're at all curious, you can look into Warren Buffet's corporate empire. The man has built his entire corporate structure around not paying taxes. And yet he's generally thought well of by the tax and spend crowd.

    For one thing he owns insurance companies. Insurance companies pay no capital gains taxes. Those taxes you pay when you buy a thing then sell a thing at a profit. Such as buying and selling stocks or bonds. By doing that buying and selling through his insurance companies he avoids that tax entirely.

    The next thing he likes to do is buy to own rather then to sell. On longer term investments he'll just own a thing rather then buying and selling from it. When he wants to draw money from it, he'll borrow against its value. The interest rate for a secured loan is tiny. We're talking about a fraction of a percent. Compare that the tax if that money were income. What is more, debts are tax deductible. So not only does he not pay tax on the income from things he does not sell but he can actually use the profits to offset taxes he cannot avoid.

    Then he owns various charities etc which allows him to throw big parties for his friends etc and deduct those expenses from other taxes owed.

    And those are just the three main ways I know of that he is going out of his way to not pay taxes. His whole empire is based on the notion of not paying them.

    And that is only possible because the taxes are complicated. If the taxes were simple then you wouldn't be able to avoid them. The problem with simple taxes is the same as the advantage. And many people like people to pay more and some to pay less. The result is that the poor generally pay nothing. The rich pay pretty much whatever they want to pay. And the middle class gets shafted because they have enough money to be taxed without the sophistication to game the system.

    And who does all that benefit? Politicians mostly. They get to tell the numerous poor that they're sticking it to the man. They get to give a knowing wink to the elites that know where all the loopholes are... and the dump saps in the middle don't even realize what is going on.

    Only way people in the middle are helped is if the job market is protected and the taxes are kept simple. The more regulations you create, the more small businesses get shut out of existence which is the primary means for people to raise themselves up in a capitalist society. You do it by making your own business. What is more, the largest employer in practically every economy is small business. They are the primary mechanism for social and economic mobility and the primary employer of everyone. And yet... the least powerful in any congress or parliament in the world.

    --
    I've decided to stop wasting my time responding to AC trolls/sockpuppets... so if you want a response from me... login.
  232. Re:Such potential by rdnetto · · Score: 1

    It's poor style to not indent the inner for, because C family languages do allow one line for-statements, which the body is replaced by a single semi-colon. Someone skimming over the code could easily interpret it as such.

    --
    Most human behaviour can be explained in terms of identity.
  233. Re:Such potential by Hognoxious · · Score: 1

    I doubt that's the problem. GP is welcome to correct me, but I rather suspect it's his brain switching from one mode to other.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  234. Re:Such potential by Hognoxious · · Score: 1

    And you have to face in a specific direction to drink it.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  235. Re:Such potential by Hognoxious · · Score: 1

    I am not sure what choices have been removed from you. You can still use C or COBOL or Pascal or whatever other choice you want.

    That's strategic choice. He's referring to tactical choice.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  236. Re:Such potential by Hognoxious · · Score: 1

    In the latter case you just put a new {/begin/do when you enter a control level and a }/end/done when you leave it. In the former you need to keep a count in a variable.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  237. Re:Such potential by shutdown+-p+now · · Score: 1

    True, but both are so trivial that the difference is largely irrelevant.

    (and in practice, most generators try to produce indented code anyway, so that it can actually be read and understood - which you'll want to do when you're writing it)