3 ms·
C is also hellish for string processing. From memory management to buffer overflows to understanding the encoding types.
by rileymat2 8y ago
C is also hellish for string processing.
From memory management to buffer overflows to understanding the encoding types.
- mpweiher 8y agoObjective-C with a reasonable Foundation is such a great language for this... It has essentially the predictability and simplicity of C, just with a minimal amount of dynamic binding to make it comfortable. And NSString variants tend to take care of string handling and encodings.
- okket 8y agoAt that level, you can just switch to the clang compiler based Swift language, which is much nicer/modern. And look, there are already Swift web frameworks like https://vapor.codes https://vapor.codes
- gkya 8y agoI really dislike the Swift/Scala/Rust/Dart/Kotlin etc. style, heavy and centralised syntax. ObjC is not very beautiful, but it has an elegant way of combining composable primitives (functions and objects). The same kinda sorta goes for Perl too, which I think is a nicer alternative to C in this stack.
- mpweiher 8y agoEr...not really. First of all, the context was "C is pretty nice for this". Objective-C adds just a tiny bit on top of C, including safe/correct string handling, and is otherwise very similar in its characteristics. Swift is an entirely new language, more like Rust or Kotlin. It's also not based on the clang compiler, clang is a C/Objective-C/C++ front end for LLVM. As to "nicer/modern", well...it does clean up some of the effects of having a hybrid (syntax duplication). Other than that, it is in many ways a step back towards C++ style languages, static/brittle, incredibly complex and incredibly slow to compile.
- earenndil 8y agoSmall nit: swift is built in llvm, much like clang is, but it's not based on it.
- mhd 8y agoIf only WebObjects would've arrived without an unnecessary Java rewrite.
- peatmoss 8y agoI also remember when Apple was pushing Java as an option for writing Cocoa apps. What little I did back then never felt like a first class citizen compared to ObjC.
- bonaldi 8y agoIs there any reasonable way to get an objective-C equipped with an NSString variant on Linux? GnuStep seems mostly abandoned.