Re: [Flightgear-devel] [Flightgear-cvslogs] CVS: data/Nasal globals.nas, 1.42, 1.43
On 17 Dec 2008, at 15:44, Syd wrote: > I dont know if this makes sense to anyone else , but to me the first > version is a word , the second option is a sentence :) Agreed completely - the issue is, I think of all these things as sentences (well, phrases, anyway) - so I find FOO2BAR rather like reading German :) (not that German isn't a wonderful language, except when spoken by me, as people may discover at LinuxTag) This mostly stems from my background in Cocoa development, where allMethodsHaveNamesLikeThis - very 'sentancy' as Syd would say. But, let's not worry about this anymore, it looks like opinion is to stick with what is used at present, and that's less work as well. James -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] [Flightgear-cvslogs] CVS: data/Nasal globals.nas, 1.42, 1.43
Melchior FRANZ wrote: > * James Turner -- Wednesday 17 December 2008: > >>> + var KT2MPS = 0.51; # knots to m/s >>> > > >> Personally I think all these constants would be easier to >> read if they were written the same way as the Simgear ones, >> i.e MPS_TO_KT, NM_TO_M and so on. >> > > I find them equally easy to read and decided to use the way > that YASim uses (from the same author as Nasal, as you probably > know). See ./src/FDM/YASim/FGFDM.cpp. I only made the DEG2RAD > even shorter (which might indeed have been a mistake). But you > can easily do something like this in your Nasal code (once there > is something like "your Nasal code", that is ;-): > > var MPS_TO_KT = MPS2KT; > > What do other Nasal developers think? I'm willing to change > it if others have problems with that, too. (And to change all > occurrences in the repository.) > I prefer the KT2MPS version myself ... no difficulty in understanding what they mean either way. I dont know if this makes sense to anyone else , but to me the first version is a word , the second option is a sentence :) Cheers -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] [Flightgear-cvslogs] CVS: data/Nasal globals.nas, 1.42, 1.43
Melchior FRANZ wrote: > var MPS_TO_KT = MPS2KT; > > What do other Nasal developers think? I'm willing to change it if > others have problems with that, too. (And to change all occurrences > in the repository.) No problem here with shorter names for the constants. For me they are easy to recognize and my lines are already too long. Alexis -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] [Flightgear-cvslogs] CVS: data/Nasal globals.nas, 1.42, 1.43
Melchior FRANZ wrote: > * James Turner -- Wednesday 17 December 2008: > > > + var KT2MPS = 0.51; # knots to m/s > > > Personally I think all these constants would be easier to > > read if they were written the same way as the Simgear ones, > > i.e MPS_TO_KT, NM_TO_M and so on. > > I find them equally easy to read and decided to use the way > that YASim uses (from the same author as Nasal, as you probably > know). See ./src/FDM/YASim/FGFDM.cpp. I only made the DEG2RAD > even shorter (which might indeed have been a mistake). But you > can easily do something like this in your Nasal code (once there > is something like "your Nasal code", that is ;-): > > var MPS_TO_KT = MPS2KT; > > What do other Nasal developers think? I'm willing to change > it if others have problems with that, too. (And to change all > occurrences in the repository.) Well, it's been a while since I wrote some Nasal code, but I personally prefer the longer names. But then my code tends to be very verbose anyway. :) > BTW (or BY_THE_WAY, as some say): LAUGH_OUT_LOUD -Stuart -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] [Flightgear-cvslogs] CVS: data/Nasal globals.nas, 1.42, 1.43
* James Turner -- Wednesday 17 December 2008: > > + var KT2MPS = 0.51; # knots to m/s > Personally I think all these constants would be easier to > read if they were written the same way as the Simgear ones, > i.e MPS_TO_KT, NM_TO_M and so on. I find them equally easy to read and decided to use the way that YASim uses (from the same author as Nasal, as you probably know). See ./src/FDM/YASim/FGFDM.cpp. I only made the DEG2RAD even shorter (which might indeed have been a mistake). But you can easily do something like this in your Nasal code (once there is something like "your Nasal code", that is ;-): var MPS_TO_KT = MPS2KT; What do other Nasal developers think? I'm willing to change it if others have problems with that, too. (And to change all occurrences in the repository.) BTW (or BY_THE_WAY, as some say): the constants in globals.nas aren't meant to become an exhaustive set of conversion factors, and I won't add some just for the sake of it. They have to be actually used by real code. m. :-) -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] [Flightgear-cvslogs] CVS: data/Nasal globals.nas, 1.42, 1.43
On 17 Dec 2008, at 01:03, Melchior Franz wrote: > + var KT2MPS = 0.51; # knots to m/s > + var MPS2KT = 1 / KT2MPS; > + > var LB2KG = 0.45359237;# pounds to kilogram > var KG2LB = 1 / LB2KG; Personally I think all these constants would be easier to read if they were written the same way as the Simgear ones, i.e MPS_TO_KT, NM_TO_M and so on. I understand the logic behind using '2' but it makes the identifiers rather dense. Entirely my opinion of course. James -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel