Ask Your Question
0

Differences between load and attach

asked 9 years ago

franpena gravatar image

Is the automatic reload of modified files the only difference between 'load' and 'attach'? In such case, if there is not a slowdown in the 'attach' performance, should not be always 'attach' preferred over 'load'?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 9 years ago

slelievre gravatar image

Here is the differences I would see.

  • If you are developing some code in an external file, and using it in the Sage REPL or the Sage Notebook, or a Sage worksheet on SageMathCloud, to debug or to explore, then 'attach' is your friend, especially while the code in the file is evolving.

  • If you just want to use some code from an external file but you are done modifying the code in that file, there is not much point in using 'attach', and 'load' is better suited to this need.

Another thing is that at some point attach was broken in the Sage Notebook. (Not sure if that is solved now?)

Preview: (hide)
link

Comments

The point is, if there is not a slowdown in the 'attach' performance, should not be always 'attach' preferred over 'load'? I.e., same speed, more features!

franpena gravatar imagefranpena ( 9 years ago )

@slelievre I don't know if attach is fixed or not, but I do know that for me (running sage 6.7) attach doesn't work, but load does.

twoerd gravatar imagetwoerd ( 9 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 9 years ago

Seen: 1,020 times

Last updated: Jun 03 '15