7 ms·
Indeed. That's why we have languages with functions now, because people didn't want to manually do a register dance in assembly. That's why we have name space
by BiteCode_dev 4y ago
Indeed.
That's why we have languages with functions now, because people didn't want to manually do a register dance in assembly.
That's why we have name spaces, because naming conventions only take you so far.
That's why we have map and filter (or equivalent) because that's what most loops are doing anyway.
Generation after generation, we discover that we all use common abstractions. We name them design patterns, then we integrate them in the language, and now they are primitives.
And the languages grow, grow, bigger and bigger. But they are better.
More productive. Less error prone. And code bases become standardized, simple problems have known solutions, jumping to a new project doesn't mean relearning the entire paradigm of the system in place.
Small languages either become big, or are replaced by things that are big, for the same reason most people prefer a car to a horse to go shopping.
Not that horse ridding will totally disapear, but it will stay in their optimal niche, they are not "the future".
- cies 4y ago> Small languages either become big, or are replaced by things that are big, for the same reason most people prefer a car to a horse to go shopping. So why are shell languages still around? Why are they not replaced by C#, C++, Java or another big (=general purpose) language? I find your horse->car comparison more akin to the sh->bash->zsh transition. Zsh is not as small as sh, but still it is in the small league is you ask me. Small does not mean w/o functions, without NS, without map/filter: it means "not general purpose".
- tester756 4y ago>So why are shell languages still around? Are they? I don't use them more than once a year
- t-3 4y agoStill alive and quite well. In fact, as more and more programs are written, they become more and more useful. We're already well into an era where programming can be nearly entirely ignored in favor of merely scripting new behavior out of the interactions between existing programs.
- mcluck 4y agoI'd say you're in the extreme minority then. I'm not a bash hacker but I usually end up writing a little script for myself at least once a month. Even just doing `command && command` is technically using a shell language
- BiteCode_dev 4y agoSo you are using bash once in a while (once a month is not a lot for a programmer) for niche use case (the specialty of bash: short scripts). Hence, you are making the point "little languages are not the future". It has found its local optimum.
- mcluck 4y agoI said I write custom scripts about once a month. I use bash literally every day. But I also wasn't arguing the future of programming languages. The parent here said that shell languages aren't being used
- pjc50 4y agoShell languages have "must be easy to type in execution order" and "must integrate with random programs on the filesystem" as an overriding consideration. You're not going to get that with Java.
- BiteCode_dev 4y agoShell languages are a very good example, because they have been replaced mostly by bigger languages. First by perl, then by python. Now a day, most people don't write bash if it must be more than a few lines: it fits niche perfectly, like horse ridding. But you are not going to do website with bash anymore, server swarm deployment with powershell or build your encoding pipeline in fish. Tasks that we used to do using those small languages, until we found out that we prefer a car to do shopping.
- majkinetor 4y ago> server swarm deployment with powershell I do this routinely with powershell. Powershell is not bash or fish, its highly usuable in all situations except those that require greatest performance and even then there are solutions for various types of problems.
- williamcotton 4y agoDo you prefer a car or a touring bus when you go shopping? Because making an analogy between a car and horse doesn't really make any sense. Why not have a niche language for making websites? Or for server swarm deployment? Or a video encoding pipeline?
- sargstuff 4y agogawk compiled via webassembly to allow for running in browser allows 'modern' gui input / output beyond the command line interface while still retaining the ability to be just a cli program.
- geysersam 4y agoI think one of the biggest counter examples to your argument is SQL. It's been around a long time. It's not general purpose. It's considered the best option there is if your setup allows you to use it.
- cultofmetatron 4y agoSQL is a beast of a language and there's definitely room for improvement. Also it's not Turing complete
- ourlordcaffeine 4y agoMysql 8 is turing complete with the recursive common table expressions
- pjc50 4y agoSQL persists because it's an interchange format, not just a programming language. It's one of the few programming languages you'll see embedded in other languages - and generating SQL from other languages is a common source of security bugs. You can't upgrade away from SQL without changing both ends of that connection. You can write large programs in SQL, but it's generally considered good practice not to. (I feel I ought to mention LINQ here, not to make any specific point but just to fanboy about it)
- Akronymus 4y agoFor LINQ, I personally vastly prefer the fluent version (IEnumerable.Select(..).Where(...) and so on) over the SQl like syntax.
- P5fRxh5kUvp2th 4y agosame, and in fact, despite using C# since before LINQ even existed, I don't even know how to write the sugar candy version of it. Part of that is me coming from C++ and its algorithm header and the other part is that the code is just easier to read and understand than the sugar candy version (to me, atleast).
- williamcotton 4y agoThere’s two things that the article mentions that your omni-language has massive problems with: 1.) Performance. For example a run-time for a user-friendly little language that maps HTTP requests to SQL queries can be much faster than a language that does the same thing by plugging user-friendly APIs together. A custom run-time can parse an HTTP request string directly into SQLite op code while the JS developer is writing glue code that takes orders of magnitude more memory and CPU time. 2.) Static analysis. This means tools that are better at finding bugs, finding optimizations, visualizing structure, etc.
- BiteCode_dev 4y agoIn your story, the small language fits local optimum, and becomes popular in its niche where it's good at. So small languages are not the future, which is what the article suggests. They are either niche (bash), dead (tcl), or gets big (sql).
- williamcotton 4y ago1.) Bash is not niche. 2.) SQL is not a general purpose programming language and is used as an example of a little language by the author. I can clearly imagine a future where instead of a few large general purpose languages we have a multitude of niche languages that have better performance characteristics, better tooling and smaller individual learning curves.
- BiteCode_dev 4y agoI won't repeat the other comments I made, but in summary, yes bash is niche, stuck in a local optimum, no sql is not small anymore.
- lolinder 4y agoBoth of these things are theoretically true, but only if the little language has enough resources behind it to optimize and build enough tooling. A big language is much more likely to have those resources because the target market is big enough to justify it. A niche little language will likely never get that kind of mass behind it, so the tools will be lacking and the runtime won't be optimized.
- williamcotton 4y agoThe irony of your horse analogy is that a horse is more general purpose than a car. A horse can travel along train tracks, roads, sidewalks, and hiking trails.