by codr7 · 4y ago · 0 comments
I spent 13 years writing Object Pascal in Delphi full time, starting from Delphi 4 and ending right about where Embarcadero entered the scene.
They seriously dropped the ball by focusing on ticking enterprise boxes and charging insane amounts for it rather than evolving and fixing stuff.
Pascal was a great language, and I wonder how much we've lost by having it go by the wayside. It was strongly-typed, easy to read, cross-platform, produced native executables, and was lightning fast to compile and execute.
I say "was" a great language because it isn't widely used today. I miss it.
Except they were prefixes on the buffer which was bad and not sane, and greatly limited the size of the original pascal strings.
And technically they were UCSD strings, not standard pascal, and other implementations used e.g. padded strings.
"Sane" strings that lead to incredible bloat and incompatibility, because there is no one true "sane" string type, so every module that doesn't know better forces their own way onto the user.
I always find it weird when people fret about bytes but not cycles, especially cycles that have to be spent waiting for memory reads.
> "Sane" strings that discourage the developer from just coming up with a simple memory management scheme that fits the situation at hand.
"Sane" compilers that discourage the developer from considering the machine level instructions. It's turtles all the way down.
There's a reason that Python is so popular and it's not performance
I had a limited number of calls into a library and a need to do a few things that escape me with regard to interacting with -- I think -- an 16550 UART[0] and its driver, but I don't recall them being particularly nasty to deal with. I mean, all things relative -- I was expecting these to be nasty to deal with because they often involved inline assembler, so the problem of "making it behave with the string" wasn't quite as pressing as "what the hell am I actually doing here?" :)
[0] My huge project was a bulletin board system in the 90s.
I also don't really know why you assume that "sane" means "doesn't let you manage memory effectively".
That said, how many applications really are bottlenecked by string processing in the first place? I don't care if processing Unicode graphemes is slow, as long as it's correct and doesn't mangle users' names.
And surely if you malloc(..) a block of memory in C and store a string in it, the memory allocation system is going to store how large a block that is anyway (even if it isn't visible to either C or Pascal probably.) I know not all strings will be malloc'd but a lot will be. And we seemed to deal with this overhead fine in the 90s?
Sounds like Go
"Break loop" being a function rather than keyword is serious PHP land.
It had better OO than C++, though. I admit it, they managed to have a sane and compact statically checked compilable OO.
OO in Object Pascal is a lot more sane than in C++, because the concept of an Object was more aligned to the existing Record type. It would be something like taking C and empowering its structs with methods. There wasn't an attempt to make radical changes, but simply extend the language with OO. Where with C++, in comparison to C, much more fundamental changes were made that created more conflicts in how the languages are used.
I could handle the xml madness but at least make sure the standard is a standard.
I'm pretty happy with rest apis on that front. I can always make them work.
Unlike gRPC, where RPC calls are just functions that take pure data arguments and return pure data structs, Cap'n Proto allows RPCs to return references to objects. The client can hold onto the reference and call methods on it, which invoke RPC calls, while the client and server runtimes keep track of what the references refer to. So you can treat remote objects as if they're local to your process.
This "location transparency" feature is at the heart of CORBA, and later, Microsoft DCOM and Java RMI. I've never used Cap'n Proto, but with CORBA/DCOM/RMI, this is a really powerful feature which allows you to work with APIs as if they're just in-process libraries. The downside is that if you pretend there's no network overhead, you might end up designing very inefficient applications, with each method call becoming a network roundtrip. It also means a client can, if you're not careful, "hog" a remote object and keep it from being deallocated, resulting in leaks or excessive memory usage.
Basic DCE-style RPC like gRPC is simpler and has more predictable performance, since you're forced to consider that you're talking to a remote API, just like REST.
Hiding network access and pretending it's all local is a recipe for disaster.
If you're writing a networked application, that's right up there on the list of things you need to focus on and never forget.
Delphi/Embarcadero went all out chasing enterprise dollars. The prices they charge burns holes in pockets for any little guys. Only in the last few years have they come to their senses with the free Community Edition and focusing again on making school/academic licenses easier to get and more accessible.
I googled it, but it wasn't clear if it was a buy-out, a rebrand, or something else.