Post ARRBin2odasKUjMSDA by monkeydom@mastodon.social
(DIR) More posts by monkeydom@mastodon.social
(DIR) Post #ARNWGMr84WtxUx8y0W by monkeydom@mastodon.social
2023-01-06T16:12:00Z
0 likes, 0 repeats
Also wondering: is anyone/any tech considering giving #ObjC a clear new home? I really do think it is not done yet and could be evolved nicely into a better suited dynamic future vs the pseudo functional way #Swift gutted it. The more I still work with it the more I still like it and see no clear alternatives for the stuff I want from a language and environment.
(DIR) Post #ARNWGNJUN5aQuuPcDA by _ka_@nrw.social
2023-01-06T16:17:19Z
0 likes, 0 repeats
@monkeydom maybe you can take a look into https://objfw.nil.im/doc/trunk/README.mdMaybe this is a new home for this language :D#ObjC #ObjFW
(DIR) Post #ARNWGNmCeKYULxqXy4 by monkeydom@mastodon.social
2023-01-06T16:23:35Z
0 likes, 0 repeats
@_ka_ interesting. Will have a look. Although usually gpl is a show stopper for me. Especially if it is already on the main library.
(DIR) Post #ARNWGOEuvZWXn1HTiy by _ka_@nrw.social
2023-01-06T16:27:47Z
0 likes, 0 repeats
@monkeydom There is a forum-topic about the license for the 1.0 release. Maybe you can join the short dialogue or in the Matrix channel. :)Forum-Link:https://objfw.nil.im/forumpost/c97884a931
(DIR) Post #ARNWGOmauMSjTT2NDU by lazarus@fosstodon.org
2023-01-06T18:56:25Z
0 likes, 0 repeats
@_ka_ @monkeydom Yeah. And it‘s GPL + QPL + x. Working on a Gtk wrapper here: https://codeberg.org/ObjGTK/ObjGTKGencc @js
(DIR) Post #ARNWGPMkjvNzHbxFZo by js@mstdn.io
2023-01-06T21:09:12Z
0 likes, 0 repeats
@lazarus@_ka_ @monkeydom Not + but OR. It's GPL or QPL or proprietary license. Your choice :)
(DIR) Post #AROeOXSbWSA5Um2VKy by monkeydom@mastodon.social
2023-01-07T10:14:43Z
0 likes, 0 repeats
@js @lazarus @_ka_ ah. Misread QPL for GPL. Good point. As long as building something with the stack does not force me to license it too I'm fine.
(DIR) Post #AROiCPzBszYKehl1Rw by js@mstdn.io
2023-01-07T10:57:15Z
0 likes, 0 repeats
@monkeydom @lazarus @_ka_ QPL allows using it in anything open source. LGPL (what I’m considering to switch to) would even allow using it in something proprietary.
(DIR) Post #AROiIyvisTbwloGV3A by js@mstdn.io
2023-01-07T10:58:56Z
0 likes, 0 repeats
@monkeydom @lazarus @_ka_ Plus even now you can use it in something proprietary if you talk to me :). Just want to avoid big corporations just taking it without giving back.
(DIR) Post #ARR2X4Up1ly9YdnYIq by uliwitness@chaos.social
2023-01-07T10:42:51Z
0 likes, 0 repeats
@_ka_ @monkeydom I never quite got this part of the readme: "It also means that the return of every init call needs to be checked against nil. But in the wild, nobody actually checks each and every return from init against nil, leading to bugs. ObjFW fixes this by making exceptions a first class citizen." ... NIL-collapsing is an explicit feature that a framework should be designed to take advantage of, it feels a bit weird to go the opposite way.
(DIR) Post #ARR2X51n3CLBCtDsgq by js@mstdn.io
2023-01-08T13:54:56Z
0 likes, 0 repeats
@uliwitness @_ka_ @monkeydom This is not about nil collapsing or propagation, which is explicitly handleld and allowed of course. This is about initialization failing and returning nil without any indication as to what the error was. 100% of the code I've seen (yes, not a single exception!) doesn't check the return value on any init when it is actually an object they need. Then go on to stuff nil into other objects or call methods with nil arguments - which is very explicitly NOT supported...
(DIR) Post #ARR2mjWqkdXhA7DNlw by monkeydom@mastodon.social
2023-01-07T16:53:22Z
0 likes, 0 repeats
@uliwitness @_ka_ agreed. Not my cup of tea either. I do love the idea of exceptions being programmer errors and not runtime things to catch and handle like errors. The observation that nobody checks unit for nil is quite astute. The conclusion seems to me also like a step in the wrong direction. However: the exception situation is quite a mess as some file system interactions are also recoverable exceptions already. :/
(DIR) Post #ARR2mk22seUoiroIOe by js@mstdn.io
2023-01-08T13:57:46Z
0 likes, 0 repeats
@monkeydom @uliwitness @_ka_ Exceptions for programmer errors is one of the most asinine ideas Apple ever had. Exceptions are explicitly so that you can recover from it. You cannot recover from a programmer error. So this just makes something that should be fatal non-fatal.Apple realized how wrong they were and in Swift convert all error: parameters to exceptions, while programmer errors just terminate. They probably would have done the same for ObjC, but it was already too late when ...
(DIR) Post #ARR2qXdktXIFRsGEIi by js@mstdn.io
2023-01-08T13:58:31Z
0 likes, 0 repeats
@monkeydom @uliwitness @_ka_ ... exceptions were added to the langauge. Foundation at that point was already designed for no exceptions, but Swift very clearly shows what would have been if Foundation was designed when exceptions were already part of the language.
(DIR) Post #ARR3MEBgkrPYNrF3rc by js@mstdn.io
2023-01-08T14:04:11Z
0 likes, 0 repeats
@uliwitness @_ka_ @monkeydom ... by Foundation. This leads to hard to track bugs when it could have been handled properly. Just returning nil and not forcing the programmer to check if they got their object leads to lazy programmers not doing their error checking. With exceptions, you can still write your code the way 99% of the people write it in Foundation, but now you can actually handle errors as well.
(DIR) Post #ARR3QoTZmET25ZnMAq by js@mstdn.io
2023-01-08T14:05:00Z
0 likes, 0 repeats
@uliwitness @_ka_ @monkeydom I wonder: This section has been written before Swift existed. Would it be less confusing if I mention write that ObjFW handles exceptions like Swift does when using Foundation in Swift?
(DIR) Post #ARR6vK3rCyCUbB0Mnw by uliwitness@chaos.social
2023-01-08T14:44:11Z
0 likes, 0 repeats
@js @_ka_ @monkeydom Might be better. I'd personally be confused how exceptions and NIL-collapsing work together. Like, if you use exceptions, do APIs even still return NIL?
(DIR) Post #ARR8yN74WA9CqC5euu by js@mstdn.io
2023-01-08T15:06:51Z
0 likes, 0 repeats
@uliwitness @_ka_ @monkeydom init for example never returns nil. But you can always get nil from things such as objectForKey: or properties. So you can still do [foo.bar doSomething] without needing to check for nil.
(DIR) Post #ARRBin2odasKUjMSDA by monkeydom@mastodon.social
2023-01-08T15:37:36Z
0 likes, 0 repeats
@js @uliwitness @_ka_ well. That predates Apple as far as I know and is still a nextism. I personally did like the approach as the process of catching exceptions wasn't a safe one in terms that everything that needs to be cleaned up would be guaranteed to be cleaned up. So I found the notion to make that always be kind of fatal and good. However, once they introduced exceptions that were okay to recover from things became messy.
(DIR) Post #ARREIbaktZBTJBRSgi by js@mstdn.io
2023-01-08T16:06:53Z
0 likes, 0 repeats
@monkeydom @uliwitness @_ka_ That's exactly my point - the problem was that they didn't have them from the start and hence code wasn't exception-safe. But if you do a fresh start, might as well do it exception-safe and use them as they were meant :).
(DIR) Post #ARRinUwwdav2JIT44W by monkeydom@mastodon.social
2023-01-08T21:33:31Z
0 likes, 0 repeats
@js @uliwitness @_ka_ Still not too sure about that as I never worked in a language which had exception handling as first class error system. From what I heard things can get complicated and nuanced by that as well.And I do like the simplicity of #ObjC as is. I also really really dislike the Nullability annotation notion. In my experience the accidental nil problem never was big enough to warrant such an prominent placement.
(DIR) Post #ARRwtE8fS4kxGfZpfE by js@mstdn.io
2023-01-09T00:26:30Z
0 likes, 0 repeats
@monkeydom @uliwitness @_ka_ The simplicity is kept, don't worry :). Especially if you use ARC, which works nicely with exceptions, so you don't even have to think about resource leakages. I agree though that many languages get exceptions wrong (looking at you, Python and Java). Exceptions are, well, that: Exceptional. If exceptions are used to essentially return a value, that's just wrong.
(DIR) Post #ARSIgvEK7tkG8jlC1w by overstrike@mastodon.social
2023-01-09T04:30:27Z
0 likes, 0 repeats
@js @monkeydom @uliwitness @_ka_ You cannot generally throw exceptions safely in ARC code unless all executables involved are compiled with the arc-exceptions flag, which defaults to off and is usually disabled in Apple’s frameworks. See the Exceptions section of https://clang.llvm.org/docs/AutomaticReferenceCounting.html