Live data from Hacker News

Native iOS development made simple [video]

smore.com

1–10 of 27 posts

Re: Native iOS development made simple [video]

#2
Nice idea, but the sample code they show in the screenshot uses "FALSE" instead of NO (the Obj-C standard boolean literal).

I'm not sure how they did that (#define?) but stay far, far away. Imagine if you opened up a Ruby codebase and found out I had aliased NO to be the same as the language builtin false... yeesh.

Also, setting boolean instance variables to NO in init is silly since Obj-C objects are calloc'd, so all ivars are guaranteed to start with default values (nil/0/NO).

Re: Native iOS development made simple [video]

#3
From all the app code generators I've seen and used, the experience is absolutely horrendous. Memory leaks, does not five you full access into the API etc... It's a lot easier to suck it up and learn Objective-C than having to deal with these tools.

Re: Native iOS development made simple [video]

#4

Nice idea, but the sample code they show in the screenshot uses "FALSE" instead of NO (the Obj-C standard boolean literal). I'm not sure how they did that (#define?) but stay far, far away. Imagine if you opened up a Ruby codebase and found out I had aliased NO to be the same as the language builtin false... yeesh. Also, setting boolean instance variables to NO in init is silly since Obj-C objects are calloc'd, so al…

I've always used YES NO TRUE FALSE interchangeably without any #defines.

Re: Native iOS development made simple [video]

#6
post #3

From all the app code generators I've seen and used, the experience is absolutely horrendous. Memory leaks, does not five you full access into the API etc... It's a lot easier to suck it up and learn Objective-C than having to deal with these tools.

What would be cool is if someone who was a REALLY good objective C developer made a tool... So that the generated code was of the highest quality.

Re: Native iOS development made simple [video]

#7

Nice idea, but the sample code they show in the screenshot uses "FALSE" instead of NO (the Obj-C standard boolean literal). I'm not sure how they did that (#define?) but stay far, far away. Imagine if you opened up a Ruby codebase and found out I had aliased NO to be the same as the language builtin false... yeesh. Also, setting boolean instance variables to NO in init is silly since Obj-C objects are calloc'd, so al…

CFBase.h defines TRUE as 1 and FALSE as 0. There's no reason to think that they defined it themselves (and indeed, I believe this would error unless they explicitly checked for a previous definition).

Re: Native iOS development made simple [video]

#9

Nice idea, but the sample code they show in the screenshot uses "FALSE" instead of NO (the Obj-C standard boolean literal). I'm not sure how they did that (#define?) but stay far, far away. Imagine if you opened up a Ruby codebase and found out I had aliased NO to be the same as the language builtin false... yeesh. Also, setting boolean instance variables to NO in init is silly since Obj-C objects are calloc'd, so al…

TRUE and FALSE are defined in obj-c (http://www.opensource.apple.com/source/objc4/objc4-371.1/run...), mainly for compatibility with C code. It's recommended YES and NO are used (http://www.opensource.apple.com/source/objc4/objc4-371.1/run...)

Re: Native iOS development made simple [video]

#10

Nice idea, but the sample code they show in the screenshot uses "FALSE" instead of NO (the Obj-C standard boolean literal). I'm not sure how they did that (#define?) but stay far, far away. Imagine if you opened up a Ruby codebase and found out I had aliased NO to be the same as the language builtin false... yeesh. Also, setting boolean instance variables to NO in init is silly since Obj-C objects are calloc'd, so al…

> I'm not sure how they did that (#define?) but stay far, far away

...NO and YES in Objective-C are themselves #defines. As others have pointed out, TRUE/FALSE are also already defined in the language, although using them in Objective-C is not good style.

http://www.opensource.apple.com/source/objc4/objc4-371.1/run...

Post reply on HN