question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deprecate `i++`, `++i`, `i--`, and `--i`.

See original GitHub issue

Compared to i+=1, i++ only saves one character.

y=i++ and y=++i is really confusing to me.

And Ceylon does not have C style for loop (IMO the only place i++ is suitable in C).

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:15 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
fwgreencommented, Sep 3, 2016

Unlike Java, it’s doubtful i++, et al, would be missed if removed from Ceylon. They were dropped from Swift once they removed C style for-loops.

1reaction
gavinkingcommented, Sep 3, 2016

A quick text search shows that:

  • ++ is used 193 times in the language module, and -- is used 32 times.
  • ++ is used 293 times in the SDK, and -- is used 254 times.
  • ++ is used 72 times in the IDE source, and -- is used 20 times.

So, while I certainly agree that it’s possible to live without these operators, it’s clear that people do use them in Ceylon, and I don’t see them as harmful. I can’t recall a time when I had a bug related to the use of these operators. (It’s true that the postfix form is confusing when you first see it.)

Anyway, if this were pre-Ceylon 1.0, perhaps I might be open to removing these operators, but at this point I don’t see any strong motivation for removing a feature that (1) we use, and (2) doesn’t seem to cause any problems at all.

I’m going to close this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deprecate Definition & Meaning - Merriam-Webster
The meaning of DEPRECATE is to express disapproval of. ... 3. : to withdraw official support for or discourage the use of (something,...
Read more >
Deprecate definition and meaning | Collins English Dictionary
1. to express earnest disapproval of · 2. to urge reasons against; protest against (a scheme, purpose, etc.) · 3. to depreciate; belittle...
Read more >
deprecate - Wiktionary
deprecate (third-person singular simple present deprecates, present participle deprecating, simple past and past participle deprecated).
Read more >
Deprecation - Wikipedia
In several fields, especially computing, deprecation is the discouragement of use of some terminology, feature, design, or practice, typically because it ...
Read more >
DEPRECATE Pragma - Database - Oracle Help Center
The DEPRECATE pragma marks a PL/SQL element as deprecated. The compiler issues warnings for uses of pragma DEPRECATE or of deprecated elements.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found