<FromGitter>
<Blacksmoke16> so since its in a block, it breaks from that, and not the while loop
<FromGitter>
<Blacksmoke16> in PHP you can do like `break 2;` but Crystal doesnt support that syntax, so would be better off refactoring your code to make use of `return` instead, or have `break` return a value you check for and `break` again
<FromGitter>
<Blacksmoke16> whats the point of `BytesRange`?
<SamantazFox>
parse, store, and analyse a `Range` header
<SamantazFox>
(`Range` being already taken, I went with that)
<SamantazFox>
This is because we need to manually chunk the data to bypass rate limitation. So we can't just forwad queries from client to the server on the other side.
<FromGitter>
<Blacksmoke16> ah, thats annoying
<SamantazFox>
yeaaaaah xD
<SamantazFox>
and idk why in heck the compiler doesn't want to accept the `if` as a guard against doing `nil-int`
<SamantazFox>
Told ya that this language was making me crazy xD
<FromGitter>
<moe:busyloop.net> i wonder if the copying could be done automagically when doing `if @foo`. would save some boilerplate code.
<FromGitter>
<Blacksmoke16> Be more complex than just doing it yourself
<FromGitter>
<moe:busyloop.net> i don't mind complex as long i don't see it and don't have to think about it :p
<FromGitter>
<moe:busyloop.net> even if it costs a bit of performance i'd default to "safe access" since that's probably the intent in 9/10 cases. and perhaps add a special syntax for "unsafe access". but yea, haven't fully thought it through - maybe there are cases where the intent is ambiguous.
<FromGitter>
<Blacksmoke16> All the tools to do that already exist
<FromGitter>
<Blacksmoke16> I don't see it changing
<FromGitter>
<Blacksmoke16> Also not_nil and try methods are a thing
<FromGitter>
<Blacksmoke16> not_nil! Rather
<FromGitter>
<moe:busyloop.net> “The computer should be doing the hard work. That’s what it’s paid to do, after all.”
<FromGitter>
<moe:busyloop.net> i think the question is, when you write `if @foo` - is there ever a case where you'd want to allow it to change under your feet afterwards?
<FromGitter>
<Blacksmoke16> no, which is why it doesnt affect typing at all
<FromGitter>
<moe:busyloop.net> so why force everyone to write `if foo = @foo` then ¯\_(ツ)_/¯
<FromGitter>
<Blacksmoke16> because they're semantically different
<FromGitter>
<Blacksmoke16> the former is an instance var while the latter is a local var
<FromGitter>
<moe:busyloop.net> yup but it seems one of the two semantics has no use-case
<FromGitter>
<Blacksmoke16> could just outright forbidding `if @foo` but that might be tricky given `if @foo.nil?` is still valid and such
<FromGitter>
<moe:busyloop.net> and that's the default semantic
<FromGitter>
<Blacksmoke16> could see*
<FromGitter>
<moe:busyloop.net> yup, getting it right would probably be tricky for sure. i don't really see it happening either. but a man can dream.
<FromGitter>
<Blacksmoke16> technically its still a valid conditional, that just doesnt reduce typing
<FromGitter>
<Blacksmoke16> so its really only invalid in certain cases