On Sun, 2007-09-23 at 23:52 -0700, Erick Tryzelaar wrote: > On 9/23/07, skaller <[EMAIL PROTECTED]> wrote: > > Never used, reserved for fork/join primitives, eg: > > > > do p1; p2; p3; done; // sequential > > fork p1; p2; p3; join; // parallel > > Interesting. I ran into something like that in an animation system. I > think join and pi calculus has that too. However, instead of ';', they > use '|' or '&' as a separator.
Yes, but ; isn't a separator, its a terminating part of a statement. > > > Windows doesn't have an os 'fork', it uses CreateProcess. > > If you want to avoid the name 'fork' use 'posix_fork'. > > > > Note that Cygwin can run BOTH Posix and Windows functions. > > > The idea was for the os-native wrappers to be done with something like this: > > module Posix::Process { > gen fork: () -> int; > } > > module Win32::Process { > gen CreateProcess: () -> int; // or whatever that interface is > } > > module Process { > gen fork (): int => > if WINDOWS then Win32::Process::CreateProcess () else > Posix::Process::fork () endif > ; > } Unfortunately that won't work. Consider a function with an argument, such as socketio with a descriptor .. the Posix and Windows socket types are different so: gen recv (s:????) => if WIN32 then Win32::recv(s) else recv(s) endif ; You have unified the functions (switch = variant = union), but not the data type. If you try union Sock = Win32_sock of HANDLE | Unix_sock of int; you can dispatch directly on the constructor, but this is a closed union. > I'd prefer to avoid issues confusing a system call like fork and > parallel primitives. I'll have to think about this. you could always defer avoiding the issue .. removed fork keyword, use it, and we can deal with it later when and if 'fork' is used. How many users code will we break? 100% = Zero out of Zero? Relatedly though .. I will probably make 'begin' and 'end' hard keywords, and change to 'stl_begin' 'stl_end' for STL stuff. Dypgen lets us throw out many keywords, but parse performance will collapse without some .. brackets are ones to keep IMHO. -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language