The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

sanjay_si (7) [Avatar] Offline
Hi, By looking up at the ScreenElement it was unclear what string meant in "ImageElement of string * Rect" - unless one read the description. If it can be written as:

type ImageFileName = string

type ScreenElement =
| TextElement of TextContent * Rect
| ImageElement of ImageFileName * Rect

The same applies for listing 7.9 on page 187

Tomas Petricek (160) [Avatar] Offline
Re: Suggestion for Listing 7.4 on Page 182
thanks for the feedback - you're right. In a bigger application it would be quite useful to define a type alias for this. I'm often trying to make the code a bit simpler and focus only on some aspects, so I didn't do that.

However, there will be an inline annotation right in the listing (in the final version), so the code should be easy to follow. Same thing could be achieved by adding a code comment (but it's of course better to make the code more self-explanatory when possible).