Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

==

Name: Anonymous 2009-06-07 18:31

Wouldn't it make more sense if the = operator tested for equality and == assigned? Since == is repeated and more emphatic?

Name: Anonymous 2009-06-07 18:33

*** ZERO EXCEPTIONS ***

Name: Anonymous 2009-06-07 18:41

>>1
You spend a lot more time on assignment than checking equality. Think of it as an optimisation :)

Name: Anonymous 2009-06-07 18:50

>>1
Also, having two characters keeps it consistent with the other relational operators (>=, <= and !=).

Name: Anonymous 2009-06-07 19:12

>>4
But then you have 4 2-char operators (>=, <=, !=, ==) and only 2 1-char operators (>, <).
If equality testing were done with =, you would have the same amount of each.

Name: Anonymous 2009-06-07 19:18

>>5
You may want to look into Forth, Lisp and Pascal. Their designers semm to think like you (in this matter, anyway).

Name: Anonymous 2009-06-07 19:24

it should be = for equality test (or declaration) and := for assignment.

Name: Anonymous 2009-06-07 19:29

>>7
Fuck off, Niklaus Wirth. Nobody likes your shitty ideas

Name: Anonymous 2009-06-07 19:38

>>6
No, I think that using == as the assignment operator is just wrong too.

Name: Anonymous 2009-06-07 19:39

>>1
My view is simply that programmers use assignment statements more often than comparison, so the shorter token = should be used for assignment.

Name: Anonymous 2009-06-07 19:48

>>10
or we could be giant faggots and have an equals function.[sup][sup] [1][/sub][/sub]



--
1. The faggots remark only holds for non-functional languages

Name: Anonymous 2009-06-07 19:48

goddammit

Name: Anonymous 2009-06-07 19:48

>>10
my view is that you should huffman code your posts

Name: Anonymous 2009-06-07 19:56

>>13
would you recommend a canonical dictionary, or a dynamic one?

Name: Anonymous 2009-06-07 20:05

>>7
The only acceptable assignment operator is this one.
foo ← "It feels so great to use this."

Name: Anonymous 2009-06-07 20:05

>>9
So?

Name: Anonymous 2009-06-07 20:05

>>14
best keep it simple, don't want to run afoul of any patents

Name: Anonymous 2009-06-07 20:06

>>6
Forth, Lisp, and Pascal all have an equal number of one- and two-character comparison operators?

Name: Anonymous 2009-06-07 20:40

>>18
Forth:  =, >, <, <>, <=, >=
Pascal: =, >, <, <>, <=, >=
Lisp:   =, >, <, /=, <=, >=

Name: Anonymous 2009-06-07 21:13

>>1
Short answer: No. Long answer: No.

Name: Anonymous 2009-06-07 21:57

I agree, ← is the best for assignment. <- also works if you can't find it on your keyboard.

Name: Anonymous 2009-06-07 22:01

>>21,15
Terrible!

Name: Anonymous 2009-06-07 22:37

>>19
that is not even correct..

Name: Anonymous 2009-06-07 22:58

>>22
But why? Knuth uses ←. APL uses ←. You should use ←.

Name: Anonymous 2009-06-07 22:59

To be truly consistent, the equality operator should really be
?=

Name: Anonymous 2009-06-07 23:11

Actually you are all wrong and the assignment operator should be [assign][var]variable-name[/var][val]value[/val][/assign], as specified in the BBCODE'98 report.

Name: Anonymous 2009-06-07 23:44

In Erlang, = performs an assignment and throws an exception if the values were not already equal.  Truly the superior design.

Name: Anonymous 2009-06-07 23:46

>>21
Use of <- would introduce ambiguity in tokenizing.

Name: Anonymous 2009-06-07 23:53

>>28
Maybe if your tokenizer is retarded.

Name: Anonymous 2009-06-07 23:57

=ω=

Name: Anonymous 2009-06-08 1:04

>>29
Hi, ''reason why Array<Array<int>> aai; breaks horribly in C++''-kun.

Name: Anonymous 2009-06-08 1:07

>>31
s/C/G/

Name: Anonymous 2009-06-08 1:35

>>22,34
facepalm

Name: Anonymous 2009-06-08 1:39

>>31
Hi, "reason why popular parser methods (e.g. CFG or Top Down) fail and Parsing Expression Grammars1 is where it's at"-kun

References
1. http://en.wikipedia.org/wiki/Parsing_expression_grammar

Name: Anonymous 2009-06-08 1:56

>>31
Hi, "Another retarded tokenizer"-kun.

Name: Anonymous 2009-06-08 2:12

>>31
This is going to be fixed in sepplesox[1]
___________________________
Reference: http://www.youtube.com/watch?v=JffvCivHEHU

Name: Anonymous 2009-06-08 2:31

>>34
That's just arbitrarily picking one meaning to resolve the ambiguousness. It doesn't change the fact that you through exceedingly poor planning of your language syntax made a<-b confusing, as the programmer could meaningfully intend either one. Or does your language do something stupid like differentiating between statements and expressions, or not allowing infix operators?

Name: Anonymous 2009-06-08 2:36

>>37
Not >>34, but my language does the sane thing and puts spaces between tokens, except for braces (when my language makes use of a lot of braces.

Name: Anonymous 2009-06-08 2:43

>>11
Did you really just close ``[sup]'' with ``[/sub]''?

Name: Anonymous 2009-06-08 2:50

>>11
Did you really just close ``[sup]'' with ``[/sub]''?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List