ChubbyGlasses
Joined 10 years ago
Joined 10 years ago
i asked it to generate some code for something i've never worked with and it seems to do a good job, not perfect but good enough for me to get a running head start.
on the other hand, i want to try and learn french, but for the life of me, i couldn't get it to provide a good starter page for learning pronunciation and the basics. bard did a good job providing a basic learning plan, but not more than that.
first time using a LLM (chatgpt or otherwise) but it's been pretty neat if a bit limited rn. like everyone else has mentioned, i want the computer from star trek and would probably be willing to pay for for it if the value proposition was high enough (read give me "superpowers" i didn't have before, less about refining my existing skill set).
it's a subtle distinction, but i think it shapes and reflects how you view ai as a tool for humans or as a replacement.
all different ways to write `if err != nil`, none of them are better than the other
> mapping/propagating an error
which is literally what i said "moves all your error handling logic to a separate file"
have you written any long-term maintainable code? comments like yours is why i've lost hope in rust and the community; you don't even understand the challenges large code bases face and yet continue with baseless zealotry.
What took the cake for me though, was a post a couple weeks ago where people were griping about Go's error handling (if err != nil) when Rust is, at best, no better than Go (e.g if you want to add any context to your error), or just objectively worse off (? operator moves all your error handling logic to a separate, completely different part of your code base).
For example, a few areas where Swift reduces boilerplate and the syntax it provides to do so:
- a complete null/optional story: first class optional types (T? = Option<T>), null chaining (obj?.prop), and null coalescing (T ?? "default")
- error handling: fn() throws Err (= fn() -> Result<T,Err>), try, try?, try!, do/catch (out-of-band error handling), w/o stack unwinding, see nulls
- and struct/enum lifecycle management: constructors, getter/setter props, defaults, named functions, named tuples, etc. (this list is loong)
Individually each feature is small and could possibly be argued as bloat or overhead since you can accomplish the same with just regular functions and Rust-like code and abstractions, but combined they make the language feel more expressive (and more fun IMO) than would otherwise be possible and often without sacrificing performance. They also serve to reduce cognitive overhead in the same way using for loops is nicer than desugaring to while loops. This is nothing to say of the syntax itself, and a bunch of other small features; Swift really is a case where the whole is greater than the sum of of its parts.