Skip to content

align and offset can be specified in either order#205

Closed
binji wants to merge 1 commit intomasterfrom
align-offset-commutative
Closed

align and offset can be specified in either order#205
binji wants to merge 1 commit intomasterfrom
align-offset-commutative

Conversation

@binji
Copy link
Member

@binji binji commented Jan 5, 2016

No description provided.

@kg
Copy link
Contributor

kg commented Jan 5, 2016

LGTM

@jfbastien
Copy link
Member

Great, thanks!

For context, this addresses WebAssembly/wabt#17

@sunfishcode
Copy link
Member

Wouldn't it be just as easy to change s2wasm to emit these in the spec order? Requiring them to be in a consistent order reduces gratuitous variation, which should make code easier for humans to read in general.

@jfbastien
Copy link
Member

@sunfishcode yes it's easy to fix, but IMO a human-oriented format shouldn't mandate an order for named parameters so I figured it was easier to fix it officially than let someone else stumble on it later.

@sunfishcode
Copy link
Member

Fixed order: easier for humans to read
Flexible order: easier for humans to write

I think optimizing for readability is more important than writeability.

@kripken
Copy link
Member

kripken commented Jan 5, 2016

Not to get philosophical, but is fixed order always easier for humans to read? I don't think it is for me - I would be surprised if the order of these particular things is fixed, i.e., I would not properly reject an invalid input when reading it - and I think I'm human (at least enough to fool captchas).

But I don't feel strongly. Happy to update s2wasm if that's what people want.

@sunfishcode
Copy link
Member

Perhaps it doesn't for all humans, but I've fooled a few captchas myself ;-), and I find code easier to read when there is less meaningless variation.

jfbastien added a commit to WebAssembly/binaryen that referenced this pull request Jan 6, 2016
These should probably be commutable so humans don't have to remember which order to read/write things in, but there's pushback and this really doesn't matter so fix it here, bikeshed on github.

This will require an associated fix in sexpr-wasm's GCC torture test failure list.

Ref: WebAssembly/wabt#17
Ref: WebAssembly/spec#205
@sunfishcode
Copy link
Member

With WebAssembly/binaryen#66 merged, the immediate concern here is now resolved, so I think we can close this. If people would like to discuss it futher, feel free to re-open or file a new issue.

@jfbastien jfbastien deleted the align-offset-commutative branch February 12, 2016 16:39
ngzhian pushed a commit to ngzhian/spec that referenced this pull request Nov 4, 2021
dhil pushed a commit to dhil/webassembly-spec that referenced this pull request Mar 2, 2023
This is not the suggestion given in that last review of WebAssembly#143:
https://github.com/WebAssembly/exception-handling/pull/143/files#r759907998

but a potential fix of the issue raised there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants