12 ms·
Isn't it the fate of all programming languages? they start on clean foundation, only to evolve in a bazaar of features.
by yodsanklai 5y ago
Isn't it the fate of all programming languages? they start on clean foundation, only to evolve in a bazaar of features.
- mccorrinall 5y agoExcuse Me Sir, Do You Have a Moment to Talk About O̶u̶r̶ ̶L̶o̶r̶d̶ ̶a̶n̶d̶ ̶S̶a̶v̶i̶o̶r̶ Lua?
- skohan 5y agoC seems ok no?
- eropple 5y agoYMMV, but to me, C is a great example of a language that absolutely could stand for a few more features. I would almost never write C++ (in the context of low level and performance-relevant code; I write a lot of things for a lot of stuff) if the type system was a touch more rigorous (why can't I specify, and have the compiler yell at me if I don't properly handle, "this pointer may never be null"? TypeScript can do this kind of type narrowing in its sleep!) and if error handling/lifecycle cleanup wasn't hazardous (I'm not even saying exceptions and try-catch, just make it easier to guarantee that a cleanup clause gets called when leaving scope, like Ruby's def-ensure-end). As it is, whenever I finally hit the breaking point with C++ (which I write mostly from inertia because I know it pretty well) it's probably Rust for me.
- skohan 5y agoThat's exactly why Zig is such an interesting language to me. The premise of trying to write a modern C replacement - essentially what C would be if it were designed with the learnings of the past 40 years in mind - is super exciting. I am a fan of Rust, but I am not 100% sold on it. The safety features and ADT's are nice, but I find it quite clunky in practice, and it is just such a huge language full of so many features. It almost feels more like a test language to try the concept of static memory management than a properly designed language in some ways. I feel it's missing the quality from C/C++ that they are a very thin abstraction over assembly.
- eropple 5y agoI haven't looked at Zig much because I mostly noodle with lower-level languages with an eye towards game prototypes and the like, so I don't know much about it. Have anything you'd recommend reading about the language?
- cturtle 5y agoI like Zig because it feels like a refinement of C with all the knowledge of the years since C was created. Some of my favorite features are no global allocator, well-defined pointers (with optionals required for nullability), generics and partial evaluation at compile-time, and builtin features/functions for all sorts of operations that are only extensions in C/C++ like SIMD and packed structs. Read [0] for a comparison among Zig, D, Rust, and C++, and read [1] for a deeper look at the language's goals. I personally really love Zig's type system [2], with a system for generics that is very simple and consistent. [0]: https://ziglang.org/learn/why_zig_rust_d_cpp/ https://ziglang.org/learn/why_zig_rust_d_cpp/ [1]: https://ziglang.org/learn/overview/ https://ziglang.org/learn/overview/ [2]: https://nathancraddock.com/blog/consistency-in-zigs-type-system/ https://nathancraddock.com/blog/consistency-in-zigs-type-sys...
- eropple 5y agoI'm going to give those a read. Thanks!
- Isognoviastoma 5y agoC begins to increase rate of adding breaking changes. C23 is about to - add keywords that was valid identifiers before - remove K&R parameter syntax - change semantics of the most popular function argument list declaration - forbid representations other than 2's complement https://news.ycombinator.com/item?id=30395016 https://news.ycombinator.com/item?id=30395016
- kevin_thibedeau 5y agoWhat new keywords? Everything new goes into the reserved namespace with macros to look like the C++ versions.
- duped 5y agoThe over adherence to bloat in the name of backwards compatibility holds the language back - these are incredibly conservative changes that reflect practices which have already been used for decades!
- hdjjhhvvhga 5y agoAs much as I hate some aspects of C, I also love it. I love it because the committees are so slow and conservative, I'm sure I can write in C89 now, I can write in C89 in ten years' time, and I don't need to care about new features someone might add or not. You can call it a moot point since the amount of what you can do in pure C today is very limited - you have to use at least a few libraries to do anything remotely useful even on very light systems, but in today's fast developing tech world it's one of these things that really stand out.
- skohan 5y agoFor what it's worth, I find it remarkable what you actually can do with C with just a few libraries. For instance it's entirely possible to write a simple video game in pure C with a few well-chosen libraries for things like audio and asset loading. There's just so much prior art out there.
- pjmlp 5y agoNaturally the libraries for audio and asset loading aren't pure C, unless I missed some chapters on ISO C document.
- jb1991 5y ago> As much as I hate some aspects of C, I also love it. I love it because the committees are so slow and conservative You might find this an interesting perspective: https://news.ycombinator.com/item?id=30404636 https://news.ycombinator.com/item?id=30404636
- rosenjcb 5y agoThat's why you keep your language small like clojure.
- lawn 5y agoThat's generally the fate of all complex systems.
- Ericson2314 5y ago"avoid success at all costs" — Haskell does it right. Having a core language helps a lot too. E.g. I don't expect Rust to go off the rails.
- pjmlp 5y agoKind of, I lost count of how many extensions exist currently, and some of them are incompatible.
- Ericson2314 5y agoFair. What remains to be seen is whether the political will to delete outmoded extensions exists.
- Fordec 5y agoI neither expect Rust to go off the rails, but the Core developer team drama lately and Mozilla stepping away makes it that I will neither be surprised in the even that it does.
- ModernMech 5y agoThe Mozilla/Facebook partnership makes me glad they have distanced themselves from the Rust. Obviously not a lot of good judgement happening at Mozilla.
- skohan 5y agoI am mostly a fan of Rust, but it's made some missteps in its evolution imo. For instance sync rust is mostly nice to work with, but async is another story entirely. I have the impression that it was somewhat rushed into the language due to community demand, but it's not really a fully solved problem.
- tiddles 5y agoThe recent post[^1] about the roadmap for Async Rust shows promise for the coming years. [^1]: https://blog.rust-lang.org/inside-rust/2022/02/03/async-in-2022.html https://blog.rust-lang.org/inside-rust/2022/02/03/async-in-2...
- xiphias2 5y agoRust dropped the GC before reaching 1.0, it was the best decision back then as the memory management evolved. But right now as it guarantees backward compatibility, only new features are allowed to be added (although a lot of new features are coming without new extra syntax).
- mucholove 5y agoI still love Objective-C. And to me—I'm so amazed that Apple added "Property Syntax" and "Properties". It's pretty easy to do much of this with Macros (which could have been baked into the system) and the language stays very simple. You would have 2 lines of code per property but one fewer concept—and I think that is a much more important factor. To me—this was not the right way to add sugar.
- bobbylarrybobby 5y agoYeah, no macros in Swift is a bit of an odd choice. It means that every would-be macro has to go through the language evolution process and be blessed by the Swift team. You can't release macro-like functionality, such as Rust's serde, without support from Apple.
- lenkite 5y agoAs someone who started learning Objective-C only after Swift become firmly established, I have to say I strangely like the language. I picked it up fast and have had no issues with adding features to a legacy codebase. When I started, I thought it would be some complicated beast, but no - its a reasonably simple and elegant C superset with the only disadvantage of some extra verbosity. (but Apple API's suffer from verbosity as a principle) I have to wonder: why did Apple create Swift ? Objective-C is quite nice, especially for C/C++ programmers. With Objective-C++, interop with C++ libraries is also terrific. Swift offers nothing like this yet.
- pjmlp 5y agoChris Lattner has mentioned that in a couple of interviews, there is a limit how much they could improve Objective-C towards being a safe systems programming language, exactly due to its C heritage.
- AnthonBerg 5y agoAs I see it, when we will have built languages that didn’t de-evolve into a bazaar of features, those will be dependently typed languages. Because a dependent type is a type that represents a computation. A word that symbolises a computation, a word which can be manipulated by hand and assured by machine – and vice versa. Software is automation. Types are signifiers of meaning. Dependent types are the automation of the automation. Using a dependently-typed language feels like handling a machine which is the result of having closed a fundamental loop of expression vs. meaning. And that is what it is. It’s very philosophical-sounding! It has its roots in philosophy – in intuitionism, where math dug down and met philosophers who had dug down from the other side. Kind of. Practically, the upshot is that things actually become simpler. Kind of because you can grip the tool everywhere. Un-dependently typed languages feel kind of like they’re part tool, part void. You usually can’t express things relating the context you’re in, or looking at.
- xiaodai 5y agowhat's an example of said language?
- amw-zero 5y agoDependent types are a false idol. It’s better to express propositions just as propositions, like in Isabelle/HOL.
- AnthonBerg 5y agoTell me more! (As I see it – at least these days – dependent types just are. It’s very, very nice to just have higher-order unification and the things that sort of fall naturally out of having it.)
- rodgerd 5y agoYou either stay unpopular enough that no-one demands that you compromise your vision, or you become popular enough that there is constant pressure to add features that are important to some part of your community.
- jslaby 5y agoC# will not rest until it has every feature of every language.
- skohan 5y agoIt's funny because it mirrors MS' approach to product development in general.
- dodyg 5y agoI rather love C# pace of evolution.
- throwaway2037 5y agoIs Java and C++ not the same? I think so. No hate for all three: I use all of them, and there are pluses and minuses about all of them! Wider question: How can a language and its core library stand still? To me, standing still is death for any computer programming language ecosystem. Many languages are just getting started on the idea of "green threads" and "colours" (sync vs async). Some of this can be done purely with a core library using existing language features, but some evolutions are better done with language features.
- nsonha 5y agoJava is leaner than C# and C++. > How can a language and its core library stand still I guess by having a more abstract foundation and relying less on adding hacks like colored function? Haskell seems to be like that. Another thing is language extensions that you have to turn on to use. This makes deprecating stuff easier in the future, so languages can trim itself instead of keep growing.
- pjmlp 5y agoJava looks more leaner, except when really wants to master it, also needs to understand JVM APIs for low level coding (invokedynamic and friends), annotation processors, JVM agents, just like C and C++ how the many existing implementations behave, bytecode rewriting libraries,....