On Thu, Jul 19, 2012 at 3:18 PM, Felix Franz
<email@hidden> wrote:
On 19.07.2012, at 15:01, Joe Armstrong wrote:
$ clang -framework Foundation main.m -o main
compiles your main.m
No quite:
clang -framework Foundation main.m -o main
main.m:14:5: error: unexpected '@' in program
@autoreleasepool {
^
1 error generated.
maybe the compiler doesn't recognize the file as an objective-c file.
$ clang -fobjc-arc -x objective-c -framework Foundation -o main main.m
(-fobjc-arc enables ARC, -x objective-c tells the compiler to use objective-c).
This xcode thing is a total nightmare - some kind of advanced video game
with ten quadzillion options for everything
:) reminds me on the discussion on the erlang mailing list "Looking for slides of a lightning talk",
just the other way around. But yes, I am using Xcode for years, and I am often lost too.
Yes - the argument was "easy things should be easy" now all I want to
to is create a process and send it a message, ie in Erlang
Pid = spawn(fun() -> ... end)
Pid ! M
and receive it
receive
X -> ...
end
Now this should be easy in objective C and X code - but all this stupid callback nonsense makes it
horrendously complex - this grand central dispatch nonsense is a mess to make callback programming
a tad less objectionable. The entire callback style of programming is total mess - zillions of little
callback routines making in impossible to the flow of control.
Retro fitting garbage collection is also a complete mess. Old code with reference counting GC fails to
compile when you enable GC
(sigh)
Actually all I want to do is use the audio units on the mac which are awesome.
All I want to say is " Instrument ! {playNote, ....}" and for a sound to be played - ...
/Joe