5 ms·
“Pick a language that most programmers consider weird but whose median user is smart, and then focus on the differences between this language and the intersecti
by cpach 5y ago
“Pick a language that most programmers consider weird but whose median user is smart, and then focus on the differences between this language and the intersection of popular languages.”
Any suggestions on which languages could fit this criteria?
- firloop 5y agoZig is one that’s been on my list for Paul's stated reason.
- deleted 5y ago[deleted]
- meheleventyone 5y agoIs Zig weird though? I find it eminently pragmatic and a lot of the interest in it comes from people migrating from popular languages like C and C++ (not that C++ isn't itself pretty weird).
- nlitened 5y agoFrom what I’ve seen, Zig has no built-in polymorphism features (no vtables/interfaces/traits), which is _pretty_ weird for a modern language in a good way.
- ncmncm 5y agoThat is just because it is new. If it survives it will end up with everything.
- judofyr 5y ago“Adding everything” is definitely not a part of Zig’s philosophy. https://github.com/ziglang/zig/issues/130#issuecomment-706011442 https://github.com/ziglang/zig/issues/130#issuecomment-70601... > However, at this point the plan is to not add an additional dynamic dispatch language feature.
- ncmncm 5y agoKey phrase: "at this point".
- alserio 5y agoIsn't that forecasting a trend with too few data points? The field is still young and changing.
- nlitened 5y agoOh, I don’t think it is a trend. I rather see it as a curious phenomenon that makes one reflect on the trade offs we usually make when using polymorphism, and whether it’s worth all the time, not only in terms of performance, but also in terms of program architecture.
- alserio 5y agoInteresting. What are the program architecture tradeoffs you are suggesting?
- nlitened 5y agoTo be honest, I have zero experience programming with Zig. But I imagine programming with Zig would lead to more literal style and fewer, simpler abstractions (no IoC, no frameworks). That might be beneficial for certain kinds of focused-scope projects.
- alserio 5y agoI see. They say you can solve every problem with an other indirection, and ad hoc polymorphism is an instance of that. But there are other ways to enable composition that are seldom reached for when your language makes that easy
- ncmncm 5y agoEvery problem, except those caused by too many indirections. Each solution uses only a few language features. Different problems call for different subsets. Not using a feature on your favorite sort of problem says nothing about its value. "Ways to enable composition" poorly supported are reached for less. Poorly supporting one of them that has proven frequently useful does not improve a language.
- sullyj3 5y agoIt has compile time programming designed to subsume those features. So eg a generic struct becomes instead a compile time function that takes a type and returns a struct
- ncmncm 5y agoThat is a wholly other set of language features, for a different purpose, and is thus no substitute. Practical languages accumulate features to better address a multitude of common real-world problems. Toy languages don't. Sometimes a toy language is adopted and grown to practicality. People always complain about that.
- judofyr 5y agoZig uses explicit allocations everywhere (if you want to allocate something you need a reference to an allocator) which is pretty unique even for low-level languages (e.g. C, Rust)
- joppy 5y agoZig is certainly not weird in the way that something like prolog or scheme are.
- jhbadger 5y agoBesides Lisp, languages like Haskell and F# would probably fit. As would Forth and modern stack languages like Factor.
- OliverM 5y agoThe APL/J/BQN family of array languages, or Prolog & other Horn clause languages. Both will change your idea of what’s expressible in a programming language.
- account-5 5y agoI'm not a programmer/developer by trade but I do like writing scripts to make my job easier. I'm looking into APL and Lisp type languages basically to expand my mind as up to now I've really only being using "traditional" type languages. It's like starting from scratch again.
- mst 5y agoThat's true for everybody, I think. I find "thinking in lisp, then writing the program out in X" where X is whatever 'mundane' language seems most suitable to the task is often a very effective technique. Array languages I've tried to learn repeatedly over the years and always ended up bouncing off, so have no opinion there except "personal aha moment not yet reached".
- xendo 5y agoRuby, Io, Prolog, Scala, Erlang, Clojure, Haskell which are covered in "Seven Languages in Seven Weeks" are quite nice for start.
- csmpltn 5y ago> "Ruby, Io, Prolog, Scala, Erlang, Clojure, Haskell" Do they offer any meaningful differences to an otherwise "mainstream" language - anything beyond syntax, tooling ecosystem and the usual functional vs. procedural vs. OOP paradigms? Anything I can't just whip up in modern C#, C++, Java or Python if I wanted to constrain myself to a specific subset of features or a specific paradigm? I get the "it's fun to try something new every once in a while" part but people tend to forget that the distinctions between programming languages have blurred significantly over the last 10+ years.
- anonymoushn 5y agoHaskell's laziness gets you all sorts of control flow that is awkward in or missing from most languages. So I think it's worth checking out.
- yesenadam 5y agoWell, Prolog for one seems very different. In functional/procedural/OOP you have to write a program describing every step of the way. In Prolog you just have to describe the destination.
- yakshaving_jgt 5y agoYes, there are plenty of meaningful differences. It's true most mainstream languages in industry are essentially syntax swaps of each other, but Prolog and Haskell are not that at all.
- wues 5y agoIn the case of Erlang the answer to your question about meaningful differences is: oh yes! I could list more, but there are two: - support for concurrency. After tasting it you never will want to go back to techniques normally used in the languages you listed - data immutability, which makes reading code so much easier.
- xendo 5y agoTLA+, AWK, jq are also interesting choices.
- saagarjha 5y agoFor 'pg it's just an excuse to talk about Lisp.
- koolba 5y agoThe max I’ve seen in both categories is Brainfuck: https://en.wikipedia.org/wiki/Brainfuck https://en.wikipedia.org/wiki/Brainfuck
- amelius 5y agoAny highly experimental language that is used only by a small group of programming language experts would fit the bill!
- cpach 5y agoSure! Just curious about what specific languages would fit this description.
- ellis0n 5y agoCheck ACPUL 1.0 pure programming language for mobiles. ACPUL have 99.5% common features. No keywords, only 2 statements (if/while), no strings in code but bulitin i18n. Here is EBNF grammar https://github.com/d08ble/acpu/blob/master/acpul-EBNF-cocor/acpul.atg https://github.com/d08ble/acpu/blob/master/acpul-EBNF-cocor/... Here is demo project https://github.com/web3cryptowallet/Web3CryptoWallet https://github.com/web3cryptowallet/Web3CryptoWallet But powerful like LISP and I am building mobile OS, IDE and nocode environment with ACPUL https://twitter.com/acpustudio https://twitter.com/acpustudio
- philipswood 5y agoI'd add Smalltalk to the other odd list suggestions given.
- mikewarot 5y agoMetamine - it seems to have been pulled from the internet by its creator, after having given some really cool demos. What's weird: it allows a mix of declarative and imperative syntax in a style that seems like normal procedural programming. You have a "magical equals" that is actually reactive programming... if any of the terms change, ever, the result gets updated. Here's a previous thread about it https://news.ycombinator.com/item?id=27555940 https://news.ycombinator.com/item?id=27555940
- ThrowawayR2 5y agoAssembly language for ARM or RISC-V. It will provide a better appreciation for what's going on under the hood. You'll also see which high level languages fit (or don't fit) this underlying fundamental model which may help cut through the marketing fluff from their various proponents and provide an unpleasant appreciation of the performance costs of popular programming paradigms.