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

Pages: 1-4041-8081-

==

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]''?

Name: Anonymous 2009-06-08 2:59

>>39
It makes sense.

Name: Anonymous 2009-06-08 3:26

Using `=' for assignment is an abomination that should never have been allowed to happen. Only someone who would think of such a thing would ever have come up with `=='. Therefore it is no coincidence that they both exist, and that they mean what they do.

Then you have Scheme, with
=
eq?
eqv?
equal?
string=?
char=?

Java has always existed.

Name: Anonymous 2009-06-08 3:30

The correct answer is = should be used for comparison and assignment.

The function of the operator can be determined by its context, so it should be determined by its context.

Regardless of using a lagnauge that uses = and ==, good programming practice dicates the context in which these should be used anyways, so having seperate operators invites errors and is a lazy way shitheads write parsers.

Name: Anonymous 2009-06-08 3:32

>>43
all languages should have a context-sensitive grammar
1/10

Name: Anonymous 2009-06-08 4:00

>>42
Using ‘?’ to denote a predicate is an abomination that never should have been allowed to happen. ‘?’ denotes a question. That's why it's called a ‘question mark’. Consider (eq? 'a 'b). This means “Is it equal?” ‘True’ is not an acceptable answer to this question. Predicates must be assertions to make any sense at all. Please stop using question marks like small children who answer “yes” on true/false tests.

Name: Anonymous 2009-06-08 5:43

ITT Shitty Trolling

Name: Anonymous 2009-06-08 10:35

>>45
You realize I was criticizing Scheme? No, you don't.

Name: Anonymous 2009-06-08 11:55

>>21
← is the best for assignment.
No. ← is for monads.

Name: Anonymous 2009-06-08 12:06

>>48
It‘s for arrows too, along with -< and -<<.

Name: Anonymous 2009-06-08 12:12

>>43
>so having seperate operators invites errors and is a lazy way shitheads write parsers.
[SPOILER]Having separate operators requires the coder have a slightly more active mind to know how to not make errors.[SPOILER]

IHBT

Name: FrozenVoid 2009-06-08 14:46

The "value assignment operator" is already reserved to :=(which is unfortunately harder to type then = ) in several languages. Anything which uses Unicode is out of the question, because this substantially decreases productivity(with hundreds of == manually entered).

_______________________________
http://xs135.xs.to/xs135/09042/av922.jpg
orbis terrarum delenda est

Name: Anonymous 2009-06-08 16:14

>>51
Anything which uses Unicode is out of the question
Why? ← is one keystroke, := is two. How is ← less productive? Truth: ← is more productive, more concise and produces more legible code. Not to mention that := looks like a penis. And I don't like penises in my code.

Name: Anonymous 2009-06-08 16:22

>>52
And I don't like penises in my code.
Try to stay away from Haskell then.

Name: Anonymous 2009-06-08 16:39

>>52
You are wrong, ← is not one keystroke, but one symbol. := is two symbols. How many keystrokes a vector of symbols is (a name), depends on various software and hardware. (strictly speaking, only on the software, the hardware can always be emulated - but it is a question: where can software run without hardware?)

For example, ← was a combination of two keystrokes for me. ^V. An extra action must be taken for the first ← used. I could set up my editor, to type 'larrow' and get that symbol instead.

You said ← is more productive. I'll say that this is a problem only to programming languages which do not have flexible grammar; semantically retarded, in practice, horribly awful. Lisp is a family of programming languages which for each it is true that they're different than the aforementioned described ones. Lisp my friend. It is lisp which will amaze you by how much you're allowed to change her, without her changing at all!

Name: Anonymous 2009-06-08 17:14

>>53
Haskell is safe from penises as long as you don't do bitwise-ORs.

Name: Anonymous 2009-06-08 17:18

>>55
_|_

Name: Anonymous 2009-06-08 17:41

>>55
someone could always define a operator, or a operator (if you use the Fixedsys Excelsior 2.00 font).

Name: Anonymous 2009-06-08 17:49

Haskell 8==========>~~ Java

Name: Anonymous 2009-06-08 17:49

>>28
Well then don't fucking do that in a C-based language.

Haskell (among other languages) treats contiguous strings of punctuation as an identifier for an operator. There is never any ambiguity between a <- b and a < - b.

Why can't a Scheme programmer write (definex5)? Is the tokenizer retarded there too?

Name: Anonymous 2009-06-08 17:58

>>54
Let's all redefine our arrow keys to produce actual arrows when pressed.

Name: AAAAAAAAHHHHHHH 2009-06-08 18:01

>>60
You mean you don't already? I have Emacs keybindings everywhere, so the arrow keys are redundant.

Name: Anonymous 2009-06-08 18:03

>>54
For me, ← is “Alt Gr + y”, two keystrokes, while := is “Shift + .” and “Shift + 0”, a total of 4.

← is clearly vastly superior, and it's counterpart, →, allows for the variable the expression's assigned to to be on the right, allowing you to code in whichever way's more natural to you (which is a good thing, no matter how many FIOC-enthusiasts tell you otherwise).

Name: Anonymous 2009-06-08 18:09

>>61
M-x arrow-mode

Name: Anonymous 2009-06-08 18:09

>>23
0/10

Name: Anonymous 2009-06-08 18:10

>>62
it's counterpart, →, allows for the variable the expression's assigned to to be on the right
variable the expression's assigned to to be on the right

BRILLIANT!!

Also,
it's

Name: Anonymous 2009-06-08 18:38

>>62
For me, ← is “Alt Gr + y”, two keystrokes, while := is “Shift + .” and “Shift + 0”, a total of 4.
I T T : A F T E R E V E R Y S H I F T E D K E Y S T R O K E W E T A K E O U R F I N G E R S O F F T H E S H I F T K E Y

Spaces used here to simulate the lifting of a finger.

Name: Anonymous 2009-06-08 18:47

>>65
You'll have to excuse me, English is my second language.

>>66
Three then. ← still wins.

Name: Anonymous 2009-06-08 19:15

>>65
I have actually used a language with a → operator. It was a shitty BASIC-like language for my graphical calculator. (Unfortunately, I did not have a TI-89.)

Name: Anonymous 2009-06-08 19:21

>>68
I've got a TI-85 with a STO key that outputs →.

Name: FrozenVoid 2009-06-09 0:13

>>62
=: can be used as → without any ambiguity.
a=:b and a:=b, with boolean (a=b)

______________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
orbis terrarum delenda est

Name: Anonymous 2009-06-09 2:23

>>37 still goes unanswered. Where are the retards from >>29 and >>34 ?

Name: Anonymous 2009-06-09 4:35

>>68
Casio CFX? I still have that one.

Name: Anonymous 2009-06-09 9:01

The only solution here is to have lexically scoped variables bound as "let x be y in exp". Thankfully, Scheme already comes close here.

Name: Anonymous 2009-06-09 10:18

(define-syntax treat
  (syntax-rules (as in)
    ((treat a as b in exp)
     (let ((a b)) exp))))

Name: Anonymous 2009-06-09 10:22

>>74
:)

Name: Anonymous 2009-06-09 15:19

>>71
Try reading the next post: >>38. You don't get into that mess without a stupid approach to tokenizing.

Name: Anonymous 2009-06-12 15:26

Assignment? No thanks, I use Haskell.

Name: Anonymous 2009-06-12 15:32

>>77
I lol'd. Not actually intending to make a living writing code then are ya?

Name: Anonymous 2009-06-12 15:35

>>78
I am, along with my job

Name: Anonymous 2009-06-12 17:34

:= for assignment and = for equality.

Name: Anonymous 2009-06-12 17:39

(is 'what (this 'assignment (speak-of 'you)))

Name: Anonymous 2009-06-12 17:41

set! for assignment and =, eq?, eqv?, equal?, string=, … for equality.

Name: Anonymous 2009-06-12 17:44

>>79
job

>>77s/Haskell/Erlang/

Name: Anonymous 2009-06-12 17:56

>>82
“?” as a predicate marker
Oh, fuck you.

Name: Anonymous 2009-06-13 1:11

>>84
Your gay?

Name: Anonymous 2009-06-13 1:22

>>85
What're y'talki' about?

Name: Anonymous 2009-06-13 5:33

>>85
I am not. Did you mean to ask about my gay?:
You're gay.

Name: Anonymous 2009-06-13 6:43

Name: Anonymous 2009-06-13 7:24

NYX MY ANUS

Name: Anonymous 2009-06-13 21:11

got.wikipedia.org?

Name: Anonymous 2009-06-13 21:24

>>90
I suspected gothic, and I verified. Gothic.

Name: Anonymous 2009-06-13 23:34

>>91
goths have their own wikipedia now?

Name: Anonymous 2009-06-14 0:16

>>91
got == Gothuania

Name: Anonymous 2010-12-06 9:33

Back to /b/, ``GNAA Faggot''

Name: Anonymous 2011-02-04 12:23

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