World: r3wp
[!REBOL3]
older newer | first last |
Ladislav 2-Aug-2010 [4222] | Brian, agreed, but e.g. "functions" are somewhat "standard" (C, ...) |
BrianH 2-Aug-2010 [4223x2] | FUNCTs and FUNCs are both procedure builders. Neither create functions. It's a common naming mistake in imperative languages. |
Including C and the Pascal it was based on. | |
Maxim 2-Aug-2010 [4225] | but really, I would rather we use the term proc instead of funct |
BrianH 2-Aug-2010 [4226] | Then it isn't like FUNC, and people are more likely to misunderstand the difference. It really is a unique concept, certainly nothing like the proc concept in other languages that have that term. |
Andreas 2-Aug-2010 [4227] | I think proc would make things even worse. Nothing would indicate that FUNC and PROC are basically the same, except for a minor (but important difference). And choosing which does which is absolutely arbitrary. |
Ladislav 2-Aug-2010 [4228] | agree with Andreas |
Andreas 2-Aug-2010 [4229] | I actually preferred Ladislav's old LFUNC naming; but FUNCT is fine as well. There simply is no easy way to name this. |
Maxim 2-Aug-2010 [4230] | I'd probably stop using func most of the time, and I can't see myself typing funct 20 times a day. everytime I write it, I feel like I'm writing a less savory femal genital word in a strange dialect of german ;-) |
Andreas 2-Aug-2010 [4231] | Yes. I think the only real choice we have is what behaviour we want to label with FUNC, which is probably the most prominent name among our options. |
BrianH 2-Aug-2010 [4232] | Maxim, nothing in REBOL corresponds to a closure, though the closure! type is closer than other function types, and many other languages call something similar to that a closure too. We don't have contexts (though "dialects" are close). Neither FUNC nor FUNCT build real functions, but they both build what other imperative languages incorrectly call functions, so people won't get confused. |
Graham 2-Aug-2010 [4233] | The value of funct over lfunct is that it sorts in proximity alphabetically |
Ladislav 2-Aug-2010 [4234] | yes, that is why I think it is quite reasonable |
Graham 2-Aug-2010 [4235] | lfunct = Lfunc |
Andreas 2-Aug-2010 [4236x3] | Which is also its most prominent shortcoming, as readers pattern-match better at the beginning of a word then at the end. |
So LFUNC is visually more different to FUNC then FUNCT is. | |
than* | |
Graham 2-Aug-2010 [4239] | depends on whether you want to stress the similarities or differences |
Maxim 2-Aug-2010 [4240] | I also prefer LFUNC the L actually has meaning in that word. the mind unwraps the L to "Local" automatically. while FUNCT really is obscure everytime you read it. |
BrianH 2-Aug-2010 [4241] | I have two reasons why I like keeping FUNC the way it is: - FUNC is the simplest function-creating function, so giving it the shortest name seems appropriate. - As a rule, we prefer to not rename old functions and then give their old names to new functions. That would be user-hostile. |
Maxim 2-Aug-2010 [4242] | I agree, func is the basis of just about every script out there. |
Andreas 2-Aug-2010 [4243] | But never forget bug#666. |
BrianH 2-Aug-2010 [4244x3] | FUNCT doesn't just gather locals ("lfunc"), it also optionally binds the function body to an object ("friend-func" to adapt the C++ term. |
Andreas, I also don't forget bug#667. | |
The rule in bug#667: "We are trying to keep our breaks in compatibility of legacy functions limited to semantic changes, removed or changed options and such, and only when necessary (see #666). Some legacy functions have been removed altogether. None have been renamed yet - except as in the example above, with the old name still there." | |
Andreas 2-Aug-2010 [4247] | Thanks, but we are discussing hypothetically here. |
Maxim 2-Aug-2010 [4248x2] | yes, but its a refinement, and even then, it still acts "locally" within that object (I'm assuming its using function locals on words in didn't bind to). |
in = it | |
Andreas 2-Aug-2010 [4250] | (And FUNCT/WITH would warrant a discussion on it's own.) |
Ladislav 2-Aug-2010 [4251] | I posted #1640 just today related to it |
Andreas 2-Aug-2010 [4252] | But given the hypothetical blank slate, I'd still agree with Brian's first argument, namely the using FUNC as name for the simplest common case is sensible. |
Maxim 2-Aug-2010 [4253] | why not call it GOSUB ;-) |
Graham 2-Aug-2010 [4254] | Of course nothing to stop you from creating new names ... F: :func LF: :funct |
BrianH 2-Aug-2010 [4255x2] | Yeah, Ladislav, I just answered that ticket. |
See bug#934 for the behavior that you rediscovered in FUNCT/with. It is in the function docs strings that show up in its help. | |
Ladislav 2-Aug-2010 [4257] | OK, nevermind, it is a detail anyway |
BrianH 2-Aug-2010 [4258] | Yeah. We really gave that and every other detail of the behavior of FUNCT a great deal of thought. If only we had given that much thought to the name: FUNCT is sort of the default name - Carl made a blog about it, and then the discussion never went anywhere, so we stuck with the initial name because it was better than the other suggestions. |
Graham 2-Aug-2010 [4259] | which blog was it? |
BrianH 2-Aug-2010 [4260] | Having trouble finding it. The function is more than 2 years old, and first came about during the first closed GUI development project. |
Graham 2-Aug-2010 [4261] | http://www.rebol.net/cgi-bin/r3blog.r?view=0144 |
BrianH 2-Aug-2010 [4262] | Note that I was in favor of FUNX rather than FUNCT :) |
Maxim 2-Aug-2010 [4263] | well, the pretty clear concensus was that funct was the least popular name by far :-) |
Graham 2-Aug-2010 [4264x2] | I too was in favour of funx |
So we have Gregg to blame! | |
BrianH 2-Aug-2010 [4266] | I find the typo quality of FUNX to be a downside now. It is harder to type FUNCT by accident when trying to type FUNC. |
Graham 2-Aug-2010 [4267] | what typo quality? because x and c are adjacent on the keyboard? |
BrianH 2-Aug-2010 [4268x2] | Then again, maybe others aren't having the same trouble with typos that I have been having lately (had to correct 6 in this sentence). |
Graham, yes, that. | |
Graham 2-Aug-2010 [4270] | If you're a touch typist, x and c use different fingers ... so it doesn't matter if they're adjaxent or not |
Maxim 2-Aug-2010 [4271] | I was about to say that |
older newer | first last |