Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow variable reuse in tuple unpacking #401

Closed
fowlmouth opened this issue Apr 25, 2013 · 2 comments
Closed

Allow variable reuse in tuple unpacking #401

fowlmouth opened this issue Apr 25, 2013 · 2 comments
Labels

Comments

@fowlmouth
Copy link
Contributor

proc foo(): tuple[found: bool, some: int] = (true, 42)
proc bar(): tuple[found: bool, some: string] = (false, "ohai")

var (found, someInt) = foo()
var (found, someStr) = bar()
@Araq
Copy link
Member

Araq commented Apr 26, 2013

The proper feature request is to allow tuple unpacking in assignments.

@Araq
Copy link
Member

Araq commented Mar 27, 2015

Proper feature request is #2421.

@Araq Araq closed this as completed Mar 27, 2015
Clyybber pushed a commit to Clyybber/Nim that referenced this issue Nov 7, 2022
…nim-lang#401 nim-lang#402 nim-lang#403 nim-lang#405 nim-lang#406 nim-lang#407 nim-lang#409 nim-lang#410 nim-lang#411 nim-lang#412 nim-lang#413

392: internal: remove sons from leaf nodes empty/none r=disruptek a=saem

## Summary
- pulls nkEmpty and nkNone into a branch without sons
- ensures more correctness by design

## Details
- various small fixes to get bootstrap working
- no tests failed, so that's a good{?} sign



395: stdlib: remove deprecated modules r=disruptek a=saem

deprecated stdlib module removal:
- removed events, LockFreeHash, parseopt2, and securehash
- associated clean-up in testament
- lib/deprecate/pure now only contains ospaths, an include for os
- remove events related tests

396: lang: remove deprecated c/C octal prefix r=disruptek a=saem

## Summary
- can no longer use 0c1
- this has long since been deprecated and not referenced in the manual


397: macros: remove deprecated TNimSym/TypeKinds r=disruptek a=saem

## Summary
- Removed macros.TNimSym and macros.TypeKinds

## Details
They are not used anywhere in the code base

399: dialect: remove old case object define r=disruptek a=saem

## Summary
- removed old case object define

NB reset magic is still present


401: stdlib: httpcore ==(string, HttpCode):bool removed r=disruptek a=saem

dropped proc from stdlib, it been deprecatd forever

402: stdlib: removed deprecated module oswalkdir r=disruptek a=saem

functionality has long since been moved to `std/os`

403: stdlib: times, remove deprecated procs r=disruptek a=saem

Removed deprecated constructors and setters for `times.DateTime`

Updated associated broken tests.

405: stdlib: remove deprecated os.existsFile/Dir r=disruptek a=saem

fileExists/dirExists are already present

406: pragma: remove the deprecated unroll pragma r=disruptek a=saem

supposedly it was ignored by the compiler, the fewer pragmas the better.

407: strutils: remove deprecated delete proc r=disruptek a=saem

## Summary

- remove deprecated `delete(var string, int, int)`
- removed associated tests
- updated usage of removed proc in rstgen

409: sequtils: remove deprecated delete proc r=disruptek a=saem

remove deprecated `delete[T](var T, int, int)` and its tests

410: algorithm: remove deprecated reversed proc r=disruptek a=saem

## Summary

- remove deprecated `reversed[T](var openArray[T], int, int): seq[T]`
- removed associated tests


411: math: renamed internal c_frexp2 to c_frexp r=disruptek a=saem

internal proc rename, no impact

412: options: remove deprecated UnpackError r=disruptek a=saem

## Summary

Removed UnpackError, was replaced with UnpackDefect a while back

## Details

Defects in general are a bad idea, but less code is good too

413: lang: remove for loop and case statement macros r=disruptek a=saem

There are better ways to do these sorts of things.

Co-authored-by: Saem Ghani <saemghani+github@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants