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

Improve the section about extend #31

Closed
HugoGiraudel opened this Issue Jan 6, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@HugoGiraudel
Owner

HugoGiraudel commented Jan 6, 2015

See #28.

@HugoGiraudel

This comment has been minimized.

Show comment
Hide comment
@HugoGiraudel

HugoGiraudel Jan 7, 2015

Owner

@iamcarrico, I rewrote the @extend section. Would you mind giving me your opinion perhaps?

http://sass-guidelin.es/#extend

Owner

HugoGiraudel commented Jan 7, 2015

@iamcarrico, I rewrote the @extend section. Would you mind giving me your opinion perhaps?

http://sass-guidelin.es/#extend

@iamcarrico

This comment has been minimized.

Show comment
Hide comment
@iamcarrico

iamcarrico Jan 7, 2015

First off, you quoted Bieber and attributed it to Beyoncé. For that, I have this:

[If you quote Bieber and attribute it to Beyoncé], you're going to burn
in a very special level of hell. A level they reserve for child molesters
and people who talk at the theater.
— Shepherd Book

This is your guide, and thus you should have the final say. I still disagree with your thesis, but as you state at the beginning, it is an "opinionated styleguide".

As a note, I was just chatting with @elyseholladay who gave me some of the research of @drewwells that supported a suspicion I had about gzip. Although a deeper explanation can be found here, the gzip thesis can only be supported if all non-dynamic code is put together and file sizes are less than 32kb. If either of these are not true, then extra bloat will be added to the codebase. Now, how much and what is worth— I am not sure and would have to do some more practical tests. But I can say that I would still rather use @extend.

iamcarrico commented Jan 7, 2015

First off, you quoted Bieber and attributed it to Beyoncé. For that, I have this:

[If you quote Bieber and attribute it to Beyoncé], you're going to burn
in a very special level of hell. A level they reserve for child molesters
and people who talk at the theater.
— Shepherd Book

This is your guide, and thus you should have the final say. I still disagree with your thesis, but as you state at the beginning, it is an "opinionated styleguide".

As a note, I was just chatting with @elyseholladay who gave me some of the research of @drewwells that supported a suspicion I had about gzip. Although a deeper explanation can be found here, the gzip thesis can only be supported if all non-dynamic code is put together and file sizes are less than 32kb. If either of these are not true, then extra bloat will be added to the codebase. Now, how much and what is worth— I am not sure and would have to do some more practical tests. But I can say that I would still rather use @extend.

@drewwells

This comment has been minimized.

Show comment
Hide comment
@drewwells

drewwells Jan 8, 2015

The rewritten sections looks great!

For more info... Gzip looks at files in 32kb blocks, so you still get benefits beyond 32kb. However, a 40kb file still benefits from compression. The code to be compressed must be in either the first 32kb or the last 8kb. Code crossing the boundary won't benefit from compression.

I'm with @HugoGiraudel about @extend. It provides some minor code optimizations but introduces a lot of headaches and novice users should be warned. It works well for very simple cases, but scaling @extend is tricky. I find more often that developers hang themselves from using it. @extend feels like a booby trap masquarading as composition/inheritance.

drewwells commented Jan 8, 2015

The rewritten sections looks great!

For more info... Gzip looks at files in 32kb blocks, so you still get benefits beyond 32kb. However, a 40kb file still benefits from compression. The code to be compressed must be in either the first 32kb or the last 8kb. Code crossing the boundary won't benefit from compression.

I'm with @HugoGiraudel about @extend. It provides some minor code optimizations but introduces a lot of headaches and novice users should be warned. It works well for very simple cases, but scaling @extend is tricky. I find more often that developers hang themselves from using it. @extend feels like a booby trap masquarading as composition/inheritance.

@HugoGiraudel

This comment has been minimized.

Show comment
Hide comment
@HugoGiraudel

HugoGiraudel Jan 8, 2015

Owner

First off, you quoted Bieber and attributed it to Beyoncé.

Fixed: http://sass-guidelin.es/#extend.

Interesting points you both in any case. I think I am cool with the current version of the @extend section. Let me close this if you don't any more objection.

Owner

HugoGiraudel commented Jan 8, 2015

First off, you quoted Bieber and attributed it to Beyoncé.

Fixed: http://sass-guidelin.es/#extend.

Interesting points you both in any case. I think I am cool with the current version of the @extend section. Let me close this if you don't any more objection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment