Skip to content

Apps should never reference ConsoleDriver #3622

@tig

Description

@tig

Originally posted by @dodexahedron in #3615 (comment)

I have never cared for this method's name, either.

Typically, an instance method on a type that has a simple verb name results in that verb being performed on the instance of the type. In other words, a Move instance method implies that the ConsoleDriver is being moved, which of course is not what's happening.

This repositions ConsoleDriver's equivalent of cursor position without moving the actual cursor, so is really just moving a 2D index for internal operations.

The method seems unnecessary anyway, however. The Row and Col properties are both public auto-properties. Why not make their set accessors public if the consumer can already effectively change them directly?

I semi-agree. My take is ConsoleDriver details should not be exposed to app code, AT ALL.

All of these operations (AddRune, Move, GetAttribute, ...) should be on either View or Application.

This issue is to track this.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions