14

I love that JS allows for variable swapping,
thanks to structuring / de-structuring.

```JavaScript
[ a , b ] = [ b , a ]
```

Thats all, lol.

Comments
  • 7
    Also, why can't devrant support Markdown already :c
  • 12
    @ElectroArchiver Because devRant is not being actively maintained or developed.
  • 5
  • 5
    I'd love to know if this gets optimized in the interpreter or if it really creates an array first and destructs it then.
  • 7
    @nitwhiz

    Well which interpreter is the questions~

    My blind guess would be that it determines the difference between the cases where there are only values being swapped and ones where actual de-/structuring is required.
  • 1
    I really do love javascript’s destructuring
  • 2
    Python allows it as well thanks to (un)packing

    ```py
    a, b = b, a
    ```
  • 0
    In time the language will become better as will the interpreter

    I just hardly understand the point with python lol
  • 0
    @ElectroArchiver because why should it support it?
  • 0
    As convenient as this is, it might be confusing. Make sure you add a comment when using that.
  • 4
    @iiii Markdown? Because this is a developer-ranting site and having one of the stable & simple formatting formats would help people express themselves better especially if it's a longer story or involves code examples,..
  • 0
    @ElectroArchiver so what if this is a development ranting platform? It does not mean we should program here or whatever.

    Anyway, it was answered a long time ago that any form of formatting will not be implemented. And more than that, devrant is abandoned, so no new features can be expected.
  • 3
    @iiii

    > so what if this is a development ranting platform?

    I literally just told you.

    > I does not mean we should program here or whatever

    Program with a formatting language? Good luck. Nobody said anything about having to use it, it would just be useful to have.
  • 0
    @ElectroArchiver a useless feature which will require support
  • 3
    @iiii (((╹д╹;))) dev calling formatting a useless feature, now I feel sorry for all the people that have to read your code..
  • 0
    @ElectroArchiver we're not writing code here. We're ranting and talking
  • 3
    @iiii Not sure how you can be so blind to the point..

    Most of us here are developers.

    There are people that rant about code.

    Do I have to elaborate any further?

    Even many third tier forums have code highlighting not to mention most have some kind of formatting.
  • 0
    @ElectroArchiver why do you need any code in a place where you get rid of steam from work? I cannot comprehend that.
  • 3
    @iiii At this point I don't think I'm able to make you understand no matter how explicit I am ..
  • 1
    @iiii I think what @ElectroArchiver is trying to say (which I support) is that markdown would be beneficial to display code on devRant. For example, in this post, she has a small block of code. Markdown would be used to format that block of code to make it easier to read. Many of the posts here include some code snippets and markdown would make them a little easier on the eyes
  • 0
    @DeepHotel such a small snippet needs no highlights
  • 1
    @iiii it’s a quality of life improvement. It certainly doesn’t need it, but it’s nice to have
Add Comment