7 ms·
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
by bodge5000 5y ago
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
- xigoi 5y agoBeing forced to use a certain style is a good thing. There's less arguing. Haskell is also indentation-based and requires spaces.
- bodge5000 5y agoYou 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.
- xigoi 5y agoThat's not true. For example, I prefer 2-space indents, but I use 4-space indents in Python because that's the convention.
- syockit 5y agoPaired 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.
- brushfoot 5y ago> 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.
- mywittyname 5y agoDo 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.
- goodpoint 5y agoYou can very easily configure your editor to convert tabs to spaces. Braces are unnecessary.
- cutler 5y agohttps://m.youtube.com/watch?v=SsoOG6ZeyUI https://m.youtube.com/watch?v=SsoOG6ZeyUI
- EnderShadow8 5y agoGo 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.
- auxym 5y agoNim 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.