News for hackers. Stuff that matters.
Re:Ana is a Python, PHP, and C inspired dynamically typed sc... by bodge5000 on Wednesday April 13, 2022 @04:30AM (#31012375)
Almost sounds like the opposite of something like Nim, which is also Python inspired but removed the dynamic typing and kept the indentation.

I think I prefer using curly braces to indentation. I seem to remember reading that Nim strictly enforces spaces over tabs (rather than having it as a linter rule, or just asking you pick one consistently) which has kept me away from the language for some time, whereas you don't tend to get those hard rules with curly braces. Could be wrong on that, and would be happy to be corrected

Sorry to detract from the main thread though, looks really nice regardless

Re:Ana is a Python, PHP, and C inspired dynamically typed sc... by auxym on Wednesday April 13, 2022 @10:49AM (#31015324)
Nim is mostly inspired by the Pascal/Modula/Oberon family, notably in its type system. The only thing it took from python (arguably) is the indentation-based block syntax.

Programming in Nim actually "feels" quite different from python to me, due to things like a much lighter OOP system (that is somewhat discouraged), the type system, and UFCS, though it "looks" like python at first glance.

Re:Ana is a Python, PHP, and C inspired dynamically typed sc... by xigoi on Wednesday April 13, 2022 @04:49AM (#31012470)
Being forced to use a certain style is a good thing. There's less arguing. Haskell is also indentation-based and requires spaces.
Re:Ana is a Python, PHP, and C inspired dynamically typed sc... by bodge5000 on Wednesday April 13, 2022 @05:02AM (#31012526)
You only tend to find that when the style your being forced to use happens to align with your own style, or you don't use the language/tool and therefore aren't affected by it.

In my experience, a lot of programmers will shout from the rooftops about the importance of consistency until the agreed upon standard isn't their standard, at which point consistency is no longer the most important matter at stake.

Re:Ana is a Python, PHP, and C inspired dynamically typed sc... by brushfoot on Wednesday April 13, 2022 @06:03AM (#31012875)
> You only tend to find that when the style your being forced to use happens to align with your own style

My style is consistency. I'm happy to use any language that enforces that rather than leaving room for bikeshedding, even if the aesthetics aren't my personal favorite. Better than wasting time debating e.g. tabs vs. spaces.

Re:Ana is a Python, PHP, and C inspired dynamically typed sc... by xigoi on Wednesday April 13, 2022 @05:07AM (#31012550)
That's not true. For example, I prefer 2-space indents, but I use 4-space indents in Python because that's the convention.
Re:Ana is a Python, PHP, and C inspired dynamically typed sc... by syockit on Wednesday April 13, 2022 @07:55AM (#31013578)
Paired with a characters-per-line limit, 4-space indents forces you to better modularise your so that it doesn't nest too deep (which usually happens when your code is becoming too complex) so I guess that's the wisdom behind the convention.
Re:Ana is a Python, PHP, and C inspired dynamically typed sc... by mywittyname on Wednesday April 13, 2022 @11:31AM (#31015871)
Do people seriously not adapt to the code style they work with?

I have to deal with different coding styles at every work place, and it takes me all of a week to forget any objections I had to it when I started.

Re:Ana is a Python, PHP, and C inspired dynamically typed sc... by goodpoint on Thursday April 14, 2022 @08:50AM (#31026255)
You can very easily configure your editor to convert tabs to spaces.

Braces are unnecessary.

Re:Ana is a Python, PHP, and C inspired dynamically typed sc... by cutler on Wednesday April 13, 2022 @05:06AM (#31012545)
Re:Ana is a Python, PHP, and C inspired dynamically typed sc... by bodge5000 on Wednesday April 13, 2022 @05:19AM (#31012620)
The fact that I only needed to see the first frame of that is probably a sign I've got a problem
Re:Ana is a Python, PHP, and C inspired dynamically typed sc... by cutler on Friday April 15, 2022 @05:13PM (#31045910)
Sorry. Couldn't resist ;-)
Re:Ana is a Python, PHP, and C inspired dynamically typed sc... by EnderShadow8 on Wednesday April 13, 2022 @09:56AM (#31014707)
Go enforces 1TBS over Allman style braces IIRC. I don't really care because I like 1TBS and also don't write Go but it did enstrange parts of the community.