[-] BatmanAoD@programming.dev 7 points 11 months ago

For interactive use, tab-completion essentially makes this a non-issue, because shells add escaping in the appropriate places.

For scripting, where spaces are harder to deal with, unfortunately there's just not much you can do; your two options are basically to learn all of your particular shell's patterns for dealing with whitespace in filenames, or only write scripts in something other than a POSIX shell.

[-] BatmanAoD@programming.dev 7 points 1 year ago

Right, but their endorsement is still likely to do more harm than good in terms of public perception of the law, I think.

[-] BatmanAoD@programming.dev 7 points 1 year ago

Kingdom of Heaven, I believe

[-] BatmanAoD@programming.dev 7 points 2 years ago

But how does the alternative solutions compare with regards to maintainability?

Which alternative solutions are you thinking of, and have you tried them?

Rust has been mentioned several times in the thread already, but Go also prohibits "standard" OOP in the sense that structs don't have inheritance. So have you used either Rust or Go on a large project?

[-] BatmanAoD@programming.dev 7 points 2 years ago

It's not a strawman, though, because Martin's actual example code in the book is like this, including a full module he rewrites toward the end.

[-] BatmanAoD@programming.dev 7 points 2 years ago* (last edited 2 years ago)

There is nothing specific in the rust port that makes fish more available for servers or LTS distros.

Being written in Rust does improve availability, because by default Rust statically links against everything except libc, and you can opt out of that if necessary. So there is inherently no need to build separate dependency packages for each distro, unless you use a Rust crate that specifically links to a C or C++ library.

[-] BatmanAoD@programming.dev 7 points 2 years ago* (last edited 2 years ago)

I see where you're coming from, but no matter how many null pointer exceptions there are in Java code, you're almost always protected from actually wrecking your system in an unrecoverable way; usually the program will just crash, and even provide a relatively helpful error message. The JVM is effectively a safety net, albeit an imperfect one. Whereas in C++, the closest thing you have to a safety net, i.e. something to guarantee that invalid memory usage crashes your program rather than corrupting its own or another process's memory, is segfaults, which are merely a nicety provided by common hardware, not required by the language or provided by the compiler. Even then, with modern compiler implementations, undefined behavior can cause an effectively unlimited amount of "bad stuff" even on hardware that supports segfaults.

Additionally, most languages with managed runtimes that existed when Java was introduced didn't actually have a static type system. In particular, Perl was very popular, and its type system is...uh...well, let's just say it gives JavaScript some serious competition.

That said, despite this grain of truth in the statement, I think the perception that Java is comparatively robust is primarily due to Java's intense marketing (particularly in its early years), which strongly pushed the idea that Java is an "enterprise" language, whatever that means.

[-] BatmanAoD@programming.dev 7 points 2 years ago

I agree so, so much; and I've been saying similar things for years.

But I recognize that it's probably a hard problem. For one thing, auth is almost never going to work the same way in CI as it does locally.

...still, though, I feel like there could be some much nicer tooling here.

[-] BatmanAoD@programming.dev 7 points 2 years ago

It's simply not true that there "aren't really that many definitions of OOP", much less that the guide you've linked is "comprehensive" when it is specifically about Java.

This is a good, brief post about the different conflicting definitions: https://paulgraham.com/reesoo.html

This is a much more comprehensive but also less focused overview, with many links, from a site that is effectively both a wiki and a forum: https://wiki.c2.com/?ReesOnObjectOrientedFeatures

[-] BatmanAoD@programming.dev 6 points 2 years ago

C is in no way "more for hobby developing and tooling". It's still foundational to compilers, language runtimes, and operating systems (the Linux kernel was, famously, exclusively written in C up until extremely recently, and the non-C parts are still optional). It's also the only supported language on many embedded devices.

[-] BatmanAoD@programming.dev 7 points 2 years ago* (last edited 2 years ago)

I feel like you may have missed the point, then? Or at least interpreted the article very differently? Rust isn't "strictly" a systems language, but neither is C or C++; people use them for application development all the time. But all three languages have very specific limitations (most obviously, that adding a garbage collector would be an unwelcome change) imposed by the need to fulfill the "systems" niche.

Compare Golang: it can't replace C++ for every use-case, because it has a garbage collector, and because you need cgo to use FFI. But it's otherwise a very flexible language that can be used for most types of software.

What I would like to see is something that shares these advantages with Go:

  • quick to build
  • easier to teach & learn than Rust
  • easier to quickly prototype with than Rust (though of course it's debatable how well Go does at this one)

...but I don't like the actual language design of Go, and I think it's possible to design a language that's more Rusty but still simpler than actual Rust.

For instance, error handling in Rust is both more ergonomic and more rigorous than in Go. That's huge! A language like Go but with sum types, Result, and the question-mark operator would be leaps and bounds nicer than Go itself.

To be clear, I don't imagine that a "smaller Rust" would replace Rust. But I also don't think we've reached optimal language design when the language I'd pick to write an OS is also the language I'd pick to write a small CLI app.

[-] BatmanAoD@programming.dev 7 points 2 years ago

It's still pretty bad that the normal equality operator is as bad as it is.

view more: ‹ prev next ›

BatmanAoD

0 post score
0 comment score
joined 3 years ago