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-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.

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